added more specs
This commit is contained in:
parent
a9f1e972ec
commit
a5b9e1c260
2 changed files with 17 additions and 1 deletions
|
@ -112,7 +112,7 @@ describe Gitlab::ImportExport::ProjectTreeSaver, services: true do
|
|||
end
|
||||
|
||||
it 'saves the correct service type' do
|
||||
expect(saved_project_json['services'].first['type']).not_to be_nil
|
||||
expect(saved_project_json['services'].first['type']).to eq('CustomIssueTrackerService')
|
||||
end
|
||||
|
||||
it 'has project feature' do
|
||||
|
|
|
@ -25,5 +25,21 @@ describe CustomIssueTrackerService, models: true do
|
|||
it { is_expected.not_to validate_presence_of(:issues_url) }
|
||||
it { is_expected.not_to validate_presence_of(:new_issue_url) }
|
||||
end
|
||||
|
||||
context 'title' do
|
||||
let(:issue_tracker) { described_class.new(properties: {}) }
|
||||
|
||||
it 'sets a default title' do
|
||||
issue_tracker.title = nil
|
||||
|
||||
expect(issue_tracker.title).to eq('Custom Issue Tracker')
|
||||
end
|
||||
|
||||
it 'sets the custom title' do
|
||||
issue_tracker.title = 'test title'
|
||||
|
||||
expect(issue_tracker.title).to eq('test title')
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue