diff options
Diffstat (limited to 'spec/services/issues/update_service_spec.rb')
-rw-r--r-- | spec/services/issues/update_service_spec.rb | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/spec/services/issues/update_service_spec.rb b/spec/services/issues/update_service_spec.rb index eb9fe2b4ed7..c4012e2a98f 100644 --- a/spec/services/issues/update_service_spec.rb +++ b/spec/services/issues/update_service_spec.rb @@ -14,6 +14,7 @@ RSpec.describe Issues::UpdateService, :mailer, feature_category: :team_planning let_it_be(:label3) { create(:label, title: 'c', project: project) } let_it_be(:milestone) { create(:milestone, project: project) } + let(:container) { project } let(:issue) do create( :issue, @@ -49,7 +50,7 @@ RSpec.describe Issues::UpdateService, :mailer, feature_category: :team_planning end def update_issue(opts) - described_class.new(container: project, current_user: user, params: opts).execute(issue) + described_class.new(container: container, current_user: user, params: opts).execute(issue) end it_behaves_like 'issuable update service updating last_edited_at values' do @@ -825,7 +826,7 @@ RSpec.describe Issues::UpdateService, :mailer, feature_category: :team_planning end it 'updates updated_at' do - expect(issue.reload.updated_at).to be > Time.current + expect(issue.reload.updated_at).to be_future end end end @@ -1006,6 +1007,12 @@ RSpec.describe Issues::UpdateService, :mailer, feature_category: :team_planning it_behaves_like 'keeps issuable labels sorted after update' it_behaves_like 'broadcasting issuable labels updates' + context 'when the issue belongs directly to a group' do + let(:container) { group } + + it_behaves_like 'updating issuable labels' + end + def update_issuable(update_params) update_issue(update_params) end |