diff options
author | Sean McGivern <sean@mcgivern.me.uk> | 2016-11-18 02:40:47 +0300 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2016-11-18 02:40:47 +0300 |
commit | dd9cd24e36768aa3af5bcd1520d90aff9a1706b5 (patch) | |
tree | 563cc52bcd2ebe265c3be23db52b03d6999ece79 /spec | |
parent | da9b6432beedd31c2c653bbf3788182b45186fc6 (diff) | |
parent | 3228798b37cc98f6c7b92371cbf6d1800d1c280b (diff) |
Merge branch 'feature/24072-improve-importing-of-github-pull-requests' into 'master'
Improve importing of github pull requests
Closes #24072
See merge request !7241
Diffstat (limited to 'spec')
-rw-r--r-- | spec/lib/gitlab/github_import/importer_spec.rb | 3 | ||||
-rw-r--r-- | spec/lib/gitlab/github_import/issue_formatter_spec.rb | 10 |
2 files changed, 5 insertions, 8 deletions
diff --git a/spec/lib/gitlab/github_import/importer_spec.rb b/spec/lib/gitlab/github_import/importer_spec.rb index 7478f86bd28..000b9aa6f83 100644 --- a/spec/lib/gitlab/github_import/importer_spec.rb +++ b/spec/lib/gitlab/github_import/importer_spec.rb @@ -101,7 +101,6 @@ describe Gitlab::GithubImport::Importer, lib: true do closed_at: nil, merged_at: nil, url: 'https://api.github.com/repos/octocat/Hello-World/pulls/1347', - labels: [double(name: 'Label #3')], ) end @@ -157,8 +156,6 @@ describe Gitlab::GithubImport::Importer, lib: true do errors: [ { type: :label, url: "https://api.github.com/repos/octocat/Hello-World/labels/bug", errors: "Validation failed: Title can't be blank, Title is invalid" }, { type: :issue, url: "https://api.github.com/repos/octocat/Hello-World/issues/1348", errors: "Validation failed: Title can't be blank, Title is too short (minimum is 0 characters)" }, - { type: :pull_request, url: "https://api.github.com/repos/octocat/Hello-World/pulls/1347", errors: "Invalid Repository. Use user/repo format." }, - { type: :pull_request, url: "https://api.github.com/repos/octocat/Hello-World/pulls/1347", errors: "Invalid Repository. Use user/repo format." }, { type: :wiki, errors: "Gitlab::Shell::Error" }, { type: :release, url: 'https://api.github.com/repos/octocat/Hello-World/releases/2', errors: "Validation failed: Description can't be blank" } ] diff --git a/spec/lib/gitlab/github_import/issue_formatter_spec.rb b/spec/lib/gitlab/github_import/issue_formatter_spec.rb index c2f1f6b91a1..95339e2f128 100644 --- a/spec/lib/gitlab/github_import/issue_formatter_spec.rb +++ b/spec/lib/gitlab/github_import/issue_formatter_spec.rb @@ -144,20 +144,20 @@ describe Gitlab::GithubImport::IssueFormatter, lib: true do end end - describe '#valid?' do + describe '#pull_request?' do context 'when mention a pull request' do let(:raw_data) { double(base_data.merge(pull_request: double)) } - it 'returns false' do - expect(issue.valid?).to eq false + it 'returns true' do + expect(issue.pull_request?).to eq true end end context 'when does not mention a pull request' do let(:raw_data) { double(base_data.merge(pull_request: nil)) } - it 'returns true' do - expect(issue.valid?).to eq true + it 'returns false' do + expect(issue.pull_request?).to eq false end end end |