diff options
author | Douwe Maan <douwe@selenight.nl> | 2017-02-16 09:41:54 -0600 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2017-02-24 09:55:01 -0600 |
commit | c927bc3ffa11c4b6033eb8d65f33c511f3207552 (patch) | |
tree | 1fbf0d4bb89916c60233a608c7c36eecda1bb970 | |
parent | faa2e2df8fb95655ebfb8523689295e223005d9d (diff) | |
download | gitlab-ce-c927bc3ffa11c4b6033eb8d65f33c511f3207552.tar.gz |
Fix specs
-rw-r--r-- | spec/models/repository_spec.rb | 1 | ||||
-rw-r--r-- | spec/requests/api/files_spec.rb | 4 |
2 files changed, 2 insertions, 3 deletions
diff --git a/spec/models/repository_spec.rb b/spec/models/repository_spec.rb index 75d961e0bac..58943fd7252 100644 --- a/spec/models/repository_spec.rb +++ b/spec/models/repository_spec.rb @@ -407,7 +407,6 @@ describe Repository, models: true do context "when an author is specified" do it "uses the given email/name to set the commit's author" do - expect do repository.update_file(user, 'README', 'Updated README!', branch_name: 'master', diff --git a/spec/requests/api/files_spec.rb b/spec/requests/api/files_spec.rb index a8ce0430401..29d67b5259e 100644 --- a/spec/requests/api/files_spec.rb +++ b/spec/requests/api/files_spec.rb @@ -127,7 +127,7 @@ describe API::Files, api: true do end it "returns a 400 if editor fails to create file" do - allow_any_instance_of(Repository).to receive(:commit_file). + allow_any_instance_of(Repository).to receive(:create_file). and_return(false) post api("/projects/#{project.id}/repository/files", user), valid_params @@ -215,7 +215,7 @@ describe API::Files, api: true do end it "returns a 400 if fails to create file" do - allow_any_instance_of(Repository).to receive(:remove_file).and_return(false) + allow_any_instance_of(Repository).to receive(:delete_file).and_return(false) delete api("/projects/#{project.id}/repository/files", user), valid_params |