@@ -20,14 +20,15 @@ describe SlackService::BuildMessage do
...
@@ -20,14 +20,15 @@ describe SlackService::BuildMessage do
}
}
end
end
let(:message){build_message}
context'succeeded'do
context'succeeded'do
let(:status){'success'}
let(:status){'success'}
let(:color){'good'}
let(:color){'good'}
let(:duration){10}
let(:duration){10}
let(:message){build_message('passed')}
it'returns a message with information about succeeded build'do
it'returns a message with information about succeeded build'do
message='<example.gitlab.com|project_name>: Commit <example.gitlab.com/commit/97de212e80737a608d939f648d959671fb0a0142/builds|97de212e> of <example.gitlab.com/commits/develop|develop> branch by hacker passed in 10 seconds'
@@ -40,8 +41,6 @@ describe SlackService::BuildMessage do
...
@@ -40,8 +41,6 @@ describe SlackService::BuildMessage do
let(:duration){10}
let(:duration){10}
it'returns a message with information about failed build'do
it'returns a message with information about failed build'do
message='<example.gitlab.com|project_name>: Commit <example.gitlab.com/commit/97de212e80737a608d939f648d959671fb0a0142/builds|97de212e> of <example.gitlab.com/commits/develop|develop> branch by hacker failed in 10 seconds'
@@ -54,11 +53,17 @@ describe SlackService::BuildMessage do
...
@@ -54,11 +53,17 @@ describe SlackService::BuildMessage do
let(:duration){1}
let(:duration){1}
it'returns seconds as singular when there is only one'do
it'returns seconds as singular when there is only one'do
message='<example.gitlab.com|project_name>: Commit <example.gitlab.com/commit/97de212e80737a608d939f648d959671fb0a0142/builds|97de212e> of <example.gitlab.com/commits/develop|develop> branch by hacker failed in 1 second'
@@ -19,14 +19,15 @@ describe SlackService::PipelineMessage do
...
@@ -19,14 +19,15 @@ describe SlackService::PipelineMessage do
}
}
end
end
let(:message){build_message}
context'succeeded'do
context'succeeded'do
let(:status){'success'}
let(:status){'success'}
let(:color){'good'}
let(:color){'good'}
let(:duration){10}
let(:duration){10}
let(:message){build_message('passed')}
it'returns a message with information about succeeded build'do
it'returns a message with information about succeeded build'do
message='<example.gitlab.com|project_name>: Pipeline <example.gitlab.com/pipelines/123|97de212e> of <example.gitlab.com/commits/develop|develop> branch by hacker passed in 10 seconds'
@@ -39,8 +40,6 @@ describe SlackService::PipelineMessage do
...
@@ -39,8 +40,6 @@ describe SlackService::PipelineMessage do
let(:duration){10}
let(:duration){10}
it'returns a message with information about failed build'do
it'returns a message with information about failed build'do
message='<example.gitlab.com|project_name>: Pipeline <example.gitlab.com/pipelines/123|97de212e> of <example.gitlab.com/commits/develop|develop> branch by hacker failed in 10 seconds'
@@ -53,11 +52,16 @@ describe SlackService::PipelineMessage do
...
@@ -53,11 +52,16 @@ describe SlackService::PipelineMessage do
let(:duration){1}
let(:duration){1}
it'returns seconds as singular when there is only one'do
it'returns seconds as singular when there is only one'do
message='<example.gitlab.com|project_name>: Pipeline <example.gitlab.com/pipelines/123|97de212e> of <example.gitlab.com/commits/develop|develop> branch by hacker failed in 1 second'