Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimothy Andrew <mail@timothyandrew.net>2016-08-16 11:40:28 +0300
committerTimothy Andrew <mail@timothyandrew.net>2016-08-16 11:40:28 +0300
commit0e2cecfd628f00e19c33d84f76e2859ebf8a073e (patch)
tree2eb2bfffbb6a0d69c562244cc705a21bad611243
parentdd3b738d5b3eb70217d7ac7f9fe441498d2e8e7e (diff)
Fix API::BranchesSpec.
- Previously created a protected branch manually, without using a factory.
-rw-r--r--spec/requests/api/branches_spec.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/requests/api/branches_spec.rb b/spec/requests/api/branches_spec.rb
index 9444138f93d..3fd989dd7a6 100644
--- a/spec/requests/api/branches_spec.rb
+++ b/spec/requests/api/branches_spec.rb
@@ -243,7 +243,7 @@ describe API::API, api: true do
end
it "removes protected branch" do
- project.protected_branches.create(name: branch_name)
+ create(:protected_branch, project: project, name: branch_name)
delete api("/projects/#{project.id}/repository/branches/#{branch_name}", user)
expect(response).to have_http_status(405)
expect(json_response['message']).to eq('Protected branch cant be removed')