diff options
Diffstat (limited to 'spec/lib/gitlab/slash_commands/presenters')
-rw-r--r-- | spec/lib/gitlab/slash_commands/presenters/issue_move_spec.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/spec/lib/gitlab/slash_commands/presenters/issue_move_spec.rb b/spec/lib/gitlab/slash_commands/presenters/issue_move_spec.rb index df949154d4c..a4d8e3957cf 100644 --- a/spec/lib/gitlab/slash_commands/presenters/issue_move_spec.rb +++ b/spec/lib/gitlab/slash_commands/presenters/issue_move_spec.rb @@ -3,15 +3,20 @@ require 'spec_helper' RSpec.describe Gitlab::SlashCommands::Presenters::IssueMove do - let_it_be(:admin) { create(:admin) } + let_it_be(:user) { create(:user) } let_it_be(:project, reload: true) { create(:project) } let_it_be(:other_project) { create(:project) } let_it_be(:old_issue, reload: true) { create(:issue, project: project) } - let(:new_issue) { Issues::MoveService.new(project, admin).execute(old_issue, other_project) } + let(:new_issue) { Issues::MoveService.new(project, user).execute(old_issue, other_project) } let(:attachment) { subject[:attachments].first } subject { described_class.new(new_issue).present(old_issue) } + before do + project.add_developer(user) + other_project.add_developer(user) + end + it { is_expected.to be_a(Hash) } it 'shows the new issue' do |