diff options
author | blackst0ne <blackst0ne.ru@gmail.com> | 2017-12-22 19:18:28 +1100 |
---|---|---|
committer | blackst0ne <blackst0ne.ru@gmail.com> | 2017-12-22 19:18:28 +1100 |
commit | 27c95364b52f4e93054c45211010aeb22e40a2b2 (patch) | |
tree | b817a1aa7bc4416bfc4cc2e51b2856d36479faf8 /spec/presenters | |
parent | 36f4710301926bb853b35d9b14a60e03b42def34 (diff) | |
download | gitlab-ce-27c95364b52f4e93054c45211010aeb22e40a2b2.tar.gz |
Replace '.team << [user, role]' with 'add_role(user)' in specs36782-replace-team-user-role-with-add_role-user-in-specs
Diffstat (limited to 'spec/presenters')
-rw-r--r-- | spec/presenters/merge_request_presenter_spec.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/presenters/merge_request_presenter_spec.rb b/spec/presenters/merge_request_presenter_spec.rb index f325d1776e4..969c4753f33 100644 --- a/spec/presenters/merge_request_presenter_spec.rb +++ b/spec/presenters/merge_request_presenter_spec.rb @@ -116,7 +116,7 @@ describe MergeRequestPresenter do end before do - project.team << [user, :developer] + project.add_developer(user) allow(resource.project).to receive(:default_branch) .and_return(resource.target_branch) @@ -270,7 +270,7 @@ describe MergeRequestPresenter do context 'when can create issue and issues enabled' do it 'returns path' do allow(project).to receive(:issues_enabled?) { true } - project.team << [user, :master] + project.add_master(user) is_expected .to eq("/#{resource.project.full_path}/issues/new?merge_request_to_resolve_discussions_of=#{resource.iid}") @@ -288,7 +288,7 @@ describe MergeRequestPresenter do context 'when issues disabled' do it 'returns nil' do allow(project).to receive(:issues_enabled?) { false } - project.team << [user, :master] + project.add_master(user) is_expected.to be_nil end @@ -307,7 +307,7 @@ describe MergeRequestPresenter do context 'when merge request enabled and has permission' do it 'has remove_wip_path' do allow(project).to receive(:merge_requests_enabled?) { true } - project.team << [user, :master] + project.add_master(user) is_expected .to eq("/#{resource.project.full_path}/merge_requests/#{resource.iid}/remove_wip") |