Skip to content

Commit

Permalink
Close presslabs#171: add tests for writing in .gitignore and .gitmodules
Browse files Browse the repository at this point in the history
  • Loading branch information
vtemian committed Dec 9, 2014
1 parent 65353fc commit f4a746d
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/views/test_current.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,22 @@ def test_write_in_git_dir(self):
ignore=CachedIgnore())
current.write(".git/index", "buf", "offset", 1)

def test_write_in_gitignore_dir(self):
with pytest.raises(FuseOSError):
current = CurrentView(repo="repo", uid=1, gid=1,
repo_path="repo_path",
read_only=Event(),
ignore=CachedIgnore())
current.write(".gitignore", "buf", "offset", 1)

def test_write_in_modules_dir(self):
with pytest.raises(FuseOSError):
current = CurrentView(repo="repo", uid=1, gid=1,
repo_path="repo_path",
read_only=Event(),
ignore=CachedIgnore())
current.write(".gitmodules", "buf", "offset", 1)

def test_write_to_large_file(self):
current = CurrentView(repo="repo", uid=1, gid=1,
repo_path="repo_path",
Expand Down

0 comments on commit f4a746d

Please sign in to comment.