debian-mirror-gitlab/spec/models/external_issue_spec.rb

25 lines
589 B
Ruby
Raw Normal View History

2015-09-11 14:41:01 +05:30
require 'spec_helper'
2015-12-23 02:04:40 +05:30
describe ExternalIssue, models: true do
2015-09-11 14:41:01 +05:30
let(:project) { double('project', to_reference: 'namespace1/project1') }
let(:issue) { described_class.new('EXT-1234', project) }
describe 'modules' do
subject { described_class }
it { is_expected.to include_module(Referable) }
end
describe '#to_reference' do
it 'returns a String reference to the object' do
expect(issue.to_reference).to eq issue.id
end
end
describe '#title' do
it 'returns a title' do
expect(issue.title).to eq "External Issue #{issue}"
end
end
end