
- Re-factor - Remove code for notifications - Remove addons - Remove travis-core gem. - Ignore logs directory only - Move core tests to spec/lib
20 lines
504 B
Ruby
20 lines
504 B
Ruby
describe Travis::Services::FindAnnotations do
|
|
let(:job) { Factory(:test) }
|
|
let!(:annotation) { Factory(:annotation, job: job) }
|
|
let(:service) { described_class.new(params) }
|
|
|
|
attr_reader :params
|
|
|
|
describe 'run' do
|
|
it 'finds annotations by a given list of ids' do
|
|
@params = { ids: [annotation.id] }
|
|
service.run.should eq([annotation])
|
|
end
|
|
|
|
it 'finds annotations by job_id' do
|
|
@params = { job_id: job.id }
|
|
service.run.should eq([annotation])
|
|
end
|
|
end
|
|
end
|