Commit 3ac5e9eb authored by Gabriel Mazetto's avatar Gabriel Mazetto

Improve specs examples

parent 3c75ee28
...@@ -206,7 +206,7 @@ describe Gitlab::GithubImport::PullRequestFormatter, lib: true do ...@@ -206,7 +206,7 @@ describe Gitlab::GithubImport::PullRequestFormatter, lib: true do
context 'when source branch does not exist' do context 'when source branch does not exist' do
let(:raw_data) { double(base_data.merge(head: removed_branch)) } let(:raw_data) { double(base_data.merge(head: removed_branch)) }
it 'prefixes branch name with to avoid collision' do it 'prefixes branch name with gh-:short_sha/:number/:user pattern to avoid collision' do
expect(pull_request.source_branch_name).to eq "gh-#{target_short_sha}/1347/octocat/removed-branch" expect(pull_request.source_branch_name).to eq "gh-#{target_short_sha}/1347/octocat/removed-branch"
end end
end end
...@@ -214,7 +214,7 @@ describe Gitlab::GithubImport::PullRequestFormatter, lib: true do ...@@ -214,7 +214,7 @@ describe Gitlab::GithubImport::PullRequestFormatter, lib: true do
context 'when source branch is from a fork' do context 'when source branch is from a fork' do
let(:raw_data) { double(base_data.merge(head: forked_branch)) } let(:raw_data) { double(base_data.merge(head: forked_branch)) }
it 'prefixes branch name with to avoid collision' do it 'prefixes branch name with gh-:short_sha/:number/:user pattern to avoid collision' do
expect(pull_request.source_branch_name).to eq "gh-#{target_short_sha}/1347/octocat/master" expect(pull_request.source_branch_name).to eq "gh-#{target_short_sha}/1347/octocat/master"
end end
end end
...@@ -222,7 +222,7 @@ describe Gitlab::GithubImport::PullRequestFormatter, lib: true do ...@@ -222,7 +222,7 @@ describe Gitlab::GithubImport::PullRequestFormatter, lib: true do
context 'when source branch is from a deleted fork' do context 'when source branch is from a deleted fork' do
let(:raw_data) { double(base_data.merge(head: branch_deleted_repo)) } let(:raw_data) { double(base_data.merge(head: branch_deleted_repo)) }
it 'prefixes branch name with to avoid collision' do it 'prefixes branch name with gh-:short_sha/:number/:user pattern to avoid collision' do
expect(pull_request.source_branch_name).to eq "gh-#{target_short_sha}/1347/octocat/master" expect(pull_request.source_branch_name).to eq "gh-#{target_short_sha}/1347/octocat/master"
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment