diff --git a/spec/models/project_services/slack_service/build_message_spec.rb b/spec/models/project_services/slack_service/build_message_spec.rb index 7fcfdf0eacdd76b11b3b4a0d53278384d7fb1ca7..a3ef121a0933e170efaad493a7736501a2b6b6ee 100644 --- a/spec/models/project_services/slack_service/build_message_spec.rb +++ b/spec/models/project_services/slack_service/build_message_spec.rb @@ -24,9 +24,10 @@ describe SlackService::BuildMessage do let(:status) { 'success' } let(:color) { 'good' } let(:duration) { 10 } - + it 'returns a message with information about succeeded build' do message = ': Commit of branch by hacker passed in 10 seconds' + expect(subject.pretext).to be_empty expect(subject.fallback).to eq(message) expect(subject.attachments).to eq([text: message, color: color]) @@ -40,12 +41,13 @@ describe SlackService::BuildMessage do it 'returns a message with information about failed build' do message = ': Commit of branch by hacker failed in 10 seconds' + expect(subject.pretext).to be_empty expect(subject.fallback).to eq(message) expect(subject.attachments).to eq([text: message, color: color]) end - end - + end + describe '#seconds_name' do let(:status) { 'failed' } let(:color) { 'danger' } @@ -53,6 +55,7 @@ describe SlackService::BuildMessage do it 'returns seconds as singular when there is only one' do message = ': Commit of branch by hacker failed in 1 second' + expect(subject.pretext).to be_empty expect(subject.fallback).to eq(message) expect(subject.attachments).to eq([text: message, color: color]) diff --git a/spec/models/project_services/slack_service/pipeline_message_spec.rb b/spec/models/project_services/slack_service/pipeline_message_spec.rb index a292defee665d8da37b1525413ece0f0d27eebc2..c27b7c82dd665b9f063e9d8044281e328def2030 100644 --- a/spec/models/project_services/slack_service/pipeline_message_spec.rb +++ b/spec/models/project_services/slack_service/pipeline_message_spec.rb @@ -26,6 +26,7 @@ describe SlackService::PipelineMessage do it 'returns a message with information about succeeded build' do message = ': Pipeline of branch by hacker passed in 10 seconds' + expect(subject.pretext).to be_empty expect(subject.fallback).to eq(message) expect(subject.attachments).to eq([text: message, color: color]) @@ -39,6 +40,7 @@ describe SlackService::PipelineMessage do it 'returns a message with information about failed build' do message = ': Pipeline of branch by hacker failed in 10 seconds' + expect(subject.pretext).to be_empty expect(subject.fallback).to eq(message) expect(subject.attachments).to eq([text: message, color: color]) @@ -52,6 +54,7 @@ describe SlackService::PipelineMessage do it 'returns seconds as singular when there is only one' do message = ': Pipeline of branch by hacker failed in 1 second' + expect(subject.pretext).to be_empty expect(subject.fallback).to eq(message) expect(subject.attachments).to eq([text: message, color: color])