summaryrefslogtreecommitdiff
path: root/spec/requests/api/branches_spec.rb
diff options
context:
space:
mode:
authorTimothy Andrew <mail@timothyandrew.net>2016-07-25 20:14:53 +0530
committerTimothy Andrew <mail@timothyandrew.net>2016-07-29 15:20:39 +0530
commit01d190a84ad9b8e4a40cbdec8a55946bac38ab76 (patch)
tree74b06499ba066a8e6d4b9c0bf13b6a5166501980 /spec/requests/api/branches_spec.rb
parent88fd401d599f94bc4ea572cd47afa7d12c484db2 (diff)
downloadgitlab-ce-01d190a84ad9b8e4a40cbdec8a55946bac38ab76.tar.gz
Have the `branches` API work with the new protected branches data model.
1. The new data model moves from `developers_can_{push,merge}` to `allowed_to_{push,merge}`. 2. The API interface has not been changed. It still accepts `developers_can_push` and `developers_can_merge` as options. These attributes are inferred from the new data model. 3. Modify the protected branch create/update services to translate from the API interface to our current data model.
Diffstat (limited to 'spec/requests/api/branches_spec.rb')
-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 719da27f919..e8fd697965f 100644
--- a/spec/requests/api/branches_spec.rb
+++ b/spec/requests/api/branches_spec.rb
@@ -112,7 +112,7 @@ describe API::API, api: true do
before do
project.repository.add_branch(user, protected_branch, 'master')
- create(:protected_branch, project: project, name: protected_branch, developers_can_push: true, developers_can_merge: true)
+ create(:protected_branch, :developers_can_push, :developers_can_merge, project: project, name: protected_branch)
end
it 'updates that a developer can push' do