Commit 8a3408180ab51effd516de3c8e85d564aa4dfabd
1 parent
2e76342d
Exists in
master
and in
4 other branches
move "users" test after project tests
Showing
1 changed file
with
27 additions
and
27 deletions
Show diff stats
spec/requests/api/projects_spec.rb
@@ -67,33 +67,6 @@ describe Gitlab::API do | @@ -67,33 +67,6 @@ describe Gitlab::API do | ||
67 | end | 67 | end |
68 | end | 68 | end |
69 | 69 | ||
70 | - describe "POST /projects/:id/users" do | ||
71 | - it "should add users to project" do | ||
72 | - expect { | ||
73 | - post api("/projects/#{project.code}/users", user), | ||
74 | - user_ids: {"0" => user2.id, "1" => user3.id}, project_access: UsersProject::DEVELOPER | ||
75 | - }.to change {project.users_projects.where(:project_access => UsersProject::DEVELOPER).count}.by(2) | ||
76 | - end | ||
77 | - end | ||
78 | - | ||
79 | - describe "PUT /projects/:id/users" do | ||
80 | - it "should update users to new access role" do | ||
81 | - expect { | ||
82 | - put api("/projects/#{project.code}/users", user), | ||
83 | - user_ids: {"0" => user}, project_access: UsersProject::DEVELOPER | ||
84 | - }.to change {project.users_projects.where(:project_access => UsersProject::DEVELOPER).count}.by(1) | ||
85 | - end | ||
86 | - end | ||
87 | - | ||
88 | - describe "DELETE /projects/:id/users" do | ||
89 | - it "should delete users from project" do | ||
90 | - expect { | ||
91 | - delete api("/projects/#{project.code}/delete", user), | ||
92 | - user_ids: {"0" => users_project.id} | ||
93 | - }.to change {project.users_projects.where(:project_access => UsersProject::DEVELOPER).count}.by(-1) | ||
94 | - end | ||
95 | - end | ||
96 | - | ||
97 | describe "GET /projects/:id" do | 70 | describe "GET /projects/:id" do |
98 | it "should return a project by id" do | 71 | it "should return a project by id" do |
99 | get api("/projects/#{project.id}", user) | 72 | get api("/projects/#{project.id}", user) |
@@ -134,6 +107,33 @@ describe Gitlab::API do | @@ -134,6 +107,33 @@ describe Gitlab::API do | ||
134 | end | 107 | end |
135 | end | 108 | end |
136 | 109 | ||
110 | + describe "POST /projects/:id/users" do | ||
111 | + it "should add users to project" do | ||
112 | + expect { | ||
113 | + post api("/projects/#{project.code}/users", user), | ||
114 | + user_ids: {"0" => user2.id, "1" => user3.id}, project_access: UsersProject::DEVELOPER | ||
115 | + }.to change {project.users_projects.where(:project_access => UsersProject::DEVELOPER).count}.by(2) | ||
116 | + end | ||
117 | + end | ||
118 | + | ||
119 | + describe "PUT /projects/:id/users" do | ||
120 | + it "should update users to new access role" do | ||
121 | + expect { | ||
122 | + put api("/projects/#{project.code}/users", user), | ||
123 | + user_ids: {"0" => user}, project_access: UsersProject::DEVELOPER | ||
124 | + }.to change {project.users_projects.where(:project_access => UsersProject::DEVELOPER).count}.by(1) | ||
125 | + end | ||
126 | + end | ||
127 | + | ||
128 | + describe "DELETE /projects/:id/users" do | ||
129 | + it "should delete users from project" do | ||
130 | + expect { | ||
131 | + delete api("/projects/#{project.code}/users", user), | ||
132 | + user_ids: {"0" => users_project.id} | ||
133 | + }.to change {project.users_projects.where(:project_access => UsersProject::DEVELOPER).count}.by(-1) | ||
134 | + end | ||
135 | + end | ||
136 | + | ||
137 | describe "GET /projects/:id/repository/tags" do | 137 | describe "GET /projects/:id/repository/tags" do |
138 | it "should return an array of project tags" do | 138 | it "should return an array of project tags" do |
139 | get api("/projects/#{project.code}/repository/tags", user) | 139 | get api("/projects/#{project.code}/repository/tags", user) |