summaryrefslogtreecommitdiff
path: root/spec/models/merge_request_spec.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-05-10 16:46:51 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2023-05-10 16:46:51 +0000
commit04ac4180cb5ba0df460034c7e64862056fd498b3 (patch)
treeca5267d12fa2aab80c1c35593b96c8cfceaa747b /spec/models/merge_request_spec.rb
parent4e9ceea7f8ff3e097ad45f6f54c1b7165248e848 (diff)
downloadgitlab-ce-04ac4180cb5ba0df460034c7e64862056fd498b3.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models/merge_request_spec.rb')
-rw-r--r--spec/models/merge_request_spec.rb15
1 files changed, 4 insertions, 11 deletions
diff --git a/spec/models/merge_request_spec.rb b/spec/models/merge_request_spec.rb
index 72420e275c5..a5e68829c5d 100644
--- a/spec/models/merge_request_spec.rb
+++ b/spec/models/merge_request_spec.rb
@@ -4647,18 +4647,11 @@ RSpec.describe MergeRequest, factory_default: :keep, feature_category: :code_rev
.to(false)
end
- it 'sets first_contribution to false' do
- subject.mark_as_merged
-
- expect(subject.state).to eq('merged')
- expect(subject.first_contribution?).to be_falsey
- end
-
- context 'when it is a contribution from a project non-member' do
- let(:non_member) { create(:user) }
+ context 'when it is a first contribution' do
+ let(:new_user) { create(:user) }
before do
- subject.update!(author: non_member)
+ subject.update!(author: new_user)
end
it 'sets first_contribution' do
@@ -4669,7 +4662,7 @@ RSpec.describe MergeRequest, factory_default: :keep, feature_category: :code_rev
end
it "doesn't set first_contribution not first contribution" do
- create(:merged_merge_request, author: non_member)
+ create(:merged_merge_request, author: new_user)
subject.mark_as_merged