diff options
author | Ilan Shamir <ilanshamir1@gmail.com> | 2016-06-14 23:43:31 +0300 |
---|---|---|
committer | Ilan Shamir <ilanshamir1@gmail.com> | 2016-06-16 01:25:18 +0300 |
commit | 94135e6275a0c538ab0a5782c3f71152894efc2d (patch) | |
tree | a32add5aa45baace061551d8cfc8fe001fab6cc6 /spec/models | |
parent | 400b4159742a7d32961d3efaa411f34d5e3117fa (diff) | |
download | gitlab-ce-94135e6275a0c538ab0a5782c3f71152894efc2d.tar.gz |
Remove JiraIssue model and replace references with ExternalIssue
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/jira_issue_spec.rb | 30 | ||||
-rw-r--r-- | spec/models/project_services/jira_service_spec.rb | 6 |
2 files changed, 4 insertions, 32 deletions
diff --git a/spec/models/jira_issue_spec.rb b/spec/models/jira_issue_spec.rb deleted file mode 100644 index 1634265b439..00000000000 --- a/spec/models/jira_issue_spec.rb +++ /dev/null @@ -1,30 +0,0 @@ -require 'spec_helper' - -describe JiraIssue do - let(:project) { create(:project) } - subject { JiraIssue.new('JIRA-123', project) } - - describe 'id' do - subject { super().id } - it { is_expected.to eq('JIRA-123') } - end - - describe 'iid' do - subject { super().iid } - it { is_expected.to eq('JIRA-123') } - end - - describe 'to_s' do - subject { super().to_s } - it { is_expected.to eq('JIRA-123') } - end - - describe :== do - specify { expect(subject).to eq(JiraIssue.new('JIRA-123', project)) } - specify { expect(subject).not_to eq(JiraIssue.new('JIRA-124', project)) } - - it 'only compares with JiraIssues' do - expect(subject).not_to eq('JIRA-123') - end - end -end diff --git a/spec/models/project_services/jira_service_spec.rb b/spec/models/project_services/jira_service_spec.rb index 5309cfb99ff..c9517324541 100644 --- a/spec/models/project_services/jira_service_spec.rb +++ b/spec/models/project_services/jira_service_spec.rb @@ -76,7 +76,8 @@ describe JiraService, models: true do end it "should call JIRA API" do - @jira_service.execute(merge_request, JiraIssue.new("JIRA-123", project)) + @jira_service.execute(merge_request, + ExternalIssue.new("JIRA-123", project)) expect(WebMock).to have_requested(:post, @comment_url).with( body: /Issue solved with/ ).once @@ -84,7 +85,8 @@ describe JiraService, models: true do it "calls the api with jira_issue_transition_id" do @jira_service.jira_issue_transition_id = 'this-is-a-custom-id' - @jira_service.execute(merge_request, JiraIssue.new("JIRA-123", project)) + @jira_service.execute(merge_request, + ExternalIssue.new("JIRA-123", project)) expect(WebMock).to have_requested(:post, @api_url).with( body: /this-is-a-custom-id/ ).once |