Commit cd846ba2b55cd1380febfa174d8cf82ad9e948f7
1 parent
94c50545
Exists in
master
and in
4 other branches
Fix tests
Showing
1 changed file
with
3 additions
and
4 deletions
Show diff stats
spec/requests/api/projects_spec.rb
... | ... | @@ -4,6 +4,8 @@ describe Gitlab::API do |
4 | 4 | include ApiHelpers |
5 | 5 | |
6 | 6 | let(:user) { Factory :user } |
7 | + let(:user2) { Factory.create(:user) } | |
8 | + let(:user3) { Factory.create(:user) } | |
7 | 9 | let!(:project) { Factory :project, owner: user } |
8 | 10 | let!(:snippet) { Factory :snippet, author: user, project: project, title: 'example' } |
9 | 11 | before { project.add_access(user, :read) } |
... | ... | @@ -63,13 +65,10 @@ describe Gitlab::API do |
63 | 65 | end |
64 | 66 | |
65 | 67 | describe "PUT /projects/:id/add_users" do |
66 | - @user2 = Factory :user | |
67 | - @user3 = Factory :user | |
68 | - | |
69 | 68 | it "should add users to existing project" do |
70 | 69 | expect { |
71 | 70 | put api("/projects/#{project.code}/add_users", user), |
72 | - user_ids: [@user2.id, @user3.id], project_access: UsersProject::DEVELOPER | |
71 | + user_ids: [user2.id, user3.id], project_access: UsersProject::DEVELOPER | |
73 | 72 | }.to change {Project.last.users_projects.where(:project_access => UsersProject::DEVELOPER).count}.by(2) |
74 | 73 | end |
75 | 74 | end | ... | ... |