diff options
author | Stan Hu <stanhu@gmail.com> | 2018-07-31 09:37:54 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2018-07-31 09:37:54 +0300 |
commit | 3cda8c93d879282af2ab5b21ca2d89daf0238f17 (patch) | |
tree | 494ce2da69553ab6dfc41257bcc9feae3726fb42 /spec | |
parent | 7c88c4af0e31081b4137bc1b93e40d22ef6a93c6 (diff) |
Fix merge request SHA
Diffstat (limited to 'spec')
-rw-r--r-- | spec/lib/bitbucket_server/representation/activity_spec.rb | 1 | ||||
-rw-r--r-- | spec/lib/gitlab/bitbucket_server_import/importer_spec.rb | 5 |
2 files changed, 5 insertions, 1 deletions
diff --git a/spec/lib/bitbucket_server/representation/activity_spec.rb b/spec/lib/bitbucket_server/representation/activity_spec.rb index 4051c8369e7..15c50e40472 100644 --- a/spec/lib/bitbucket_server/representation/activity_spec.rb +++ b/spec/lib/bitbucket_server/representation/activity_spec.rb @@ -33,5 +33,6 @@ describe BitbucketServer::Representation::Activity do it { expect(subject.committer_email).to eq('test.user@example.com') } it { expect(subject.merge_timestamp).to be_a(Time) } it { expect(subject.created_at).to be_a(Time) } + it { expect(subject.merge_commit).to eq('839fa9a2d434eb697815b8fcafaecc51accfdbbc') } end end diff --git a/spec/lib/gitlab/bitbucket_server_import/importer_spec.rb b/spec/lib/gitlab/bitbucket_server_import/importer_spec.rb index 20b0dcdd8a0..c7cee15ff36 100644 --- a/spec/lib/gitlab/bitbucket_server_import/importer_spec.rb +++ b/spec/lib/gitlab/bitbucket_server_import/importer_spec.rb @@ -65,7 +65,9 @@ describe Gitlab::BitbucketServerImport::Importer do comment?: false, merge_event?: true, committer_email: project.owner.email, - merge_timestamp: now) + merge_timestamp: now, + merge_commit: '12345678' + ) @pr_note = instance_double( BitbucketServer::Representation::Comment, @@ -90,6 +92,7 @@ describe Gitlab::BitbucketServerImport::Importer do merge_request = MergeRequest.first expect(merge_request.metrics.merged_by).to eq(project.owner) expect(merge_request.metrics.merged_at).to eq(@merge_event.merge_timestamp) + expect(merge_request.merge_commit_sha).to eq('12345678') end it 'imports comments' do |