summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-07-16 17:04:49 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-07-16 17:04:49 +0200
commitabd2bc00f92d6c516e1b1922355fb187b134f873 (patch)
treec0d059de4cbafb7f5ffe22eef424d359501d1b32
parent989329c9d9fb28092d8250a86a2dd6f4afc3a445 (diff)
downloadgitlab-ce-abd2bc00f92d6c516e1b1922355fb187b134f873.tar.gz
Fix some of tests
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
-rw-r--r--spec/models/project_services/slack_service_spec.rb2
-rw-r--r--spec/models/repository_spec.rb4
-rw-r--r--spec/support/mentionable_shared_examples.rb2
3 files changed, 4 insertions, 4 deletions
diff --git a/spec/models/project_services/slack_service_spec.rb b/spec/models/project_services/slack_service_spec.rb
index 69466b11f09..97b60e19e40 100644
--- a/spec/models/project_services/slack_service_spec.rb
+++ b/spec/models/project_services/slack_service_spec.rb
@@ -67,7 +67,7 @@ describe SlackService do
opts = {
title: 'Awesome merge_request',
description: 'please fix',
- source_branch: 'stable',
+ source_branch: 'feature',
target_branch: 'master'
}
merge_service = MergeRequests::CreateService.new(project,
diff --git a/spec/models/repository_spec.rb b/spec/models/repository_spec.rb
index d25351b0f0e..d96244f23e0 100644
--- a/spec/models/repository_spec.rb
+++ b/spec/models/repository_spec.rb
@@ -36,13 +36,13 @@ describe Repository do
describe :can_be_merged? do
context 'mergeable branches' do
- subject { repository.can_be_merged?('feature', 'master') }
+ subject { repository.can_be_merged?('0b4bc9a49b562e85de7cc9e834518ea6828729b9', 'master') }
it { is_expected.to be_truthy }
end
context 'non-mergeable branches' do
- subject { repository.can_be_merged?('feature_conflict', 'feature') }
+ subject { repository.can_be_merged?('bb5206fee213d983da88c47f9cf4cc6caf9c66dc', 'feature') }
it { is_expected.to be_falsey }
end
diff --git a/spec/support/mentionable_shared_examples.rb b/spec/support/mentionable_shared_examples.rb
index f0717e61781..e3de0afb448 100644
--- a/spec/support/mentionable_shared_examples.rb
+++ b/spec/support/mentionable_shared_examples.rb
@@ -9,7 +9,7 @@ def common_mentionable_setup
let(:author) { subject.author }
let(:mentioned_issue) { create(:issue, project: project) }
- let(:mentioned_mr) { create(:merge_request, :simple, source_project: project) }
+ let!(:mentioned_mr) { create(:merge_request, :simple, source_project: project) }
let(:mentioned_commit) { project.commit }
let(:ext_proj) { create(:project, :public) }