blob: 667228cbab40ef215dc7a580a2d7e311ef97a2b5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe Gitlab::Chat::Responder::Base do
let(:project) { double(:project) }
let(:pipeline) { double(:pipeline, project: project) }
let(:build) { double(:build, pipeline: pipeline) }
let(:responder) { described_class.new(build) }
describe '#pipeline' do
it 'returns the pipeline' do
expect(responder.pipeline).to eq(pipeline)
end
end
describe '#project' do
it 'returns the project' do
expect(responder.project).to eq(project)
end
end
describe '#success' do
it 'raises NotImplementedError' do
expect { responder.success }.to raise_error(NotImplementedError)
end
end
describe '#failure' do
it 'raises NotImplementedError' do
expect { responder.failure }.to raise_error(NotImplementedError)
end
end
describe '#send_response' do
it 'raises NotImplementedError' do
expect { responder.send_response('hello') }
.to raise_error(NotImplementedError)
end
end
describe '#scheduled_output' do
it 'raises NotImplementedError' do
expect { responder.scheduled_output }
.to raise_error(NotImplementedError)
end
end
end
|