diff options
author | Jeroen van Baarsen <jeroenvanbaarsen@gmail.com> | 2015-09-16 13:19:46 +0200 |
---|---|---|
committer | Jeroen van Baarsen <jeroenvanbaarsen@gmail.com> | 2016-05-18 11:09:51 -0500 |
commit | 80817644a74e6ead62c2c66d4bd2826ecf634393 (patch) | |
tree | fe89029fdaef060babfbeea96cd81e497ffdcbe3 /spec/models/project_services | |
parent | 636b3ebb011d7bc58c70a642c7b6920ab99c0b6d (diff) | |
download | gitlab-ce-80817644a74e6ead62c2c66d4bd2826ecf634393.tar.gz |
Improve issue formatting in Slack service
Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
Diffstat (limited to 'spec/models/project_services')
-rw-r--r-- | spec/models/project_services/slack_service/issue_message_spec.rb | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/spec/models/project_services/slack_service/issue_message_spec.rb b/spec/models/project_services/slack_service/issue_message_spec.rb index f648cbe2dee..0f8889bdf3c 100644 --- a/spec/models/project_services/slack_service/issue_message_spec.rb +++ b/spec/models/project_services/slack_service/issue_message_spec.rb @@ -25,7 +25,7 @@ describe SlackService::IssueMessage, models: true do } end - let(:color) { '#345' } + let(:color) { '#C95823' } context '#initialize' do before do @@ -40,10 +40,11 @@ describe SlackService::IssueMessage, models: true do context 'open' do it 'returns a message regarding opening of issues' do expect(subject.pretext).to eq( - 'Test User opened <url|issue #100> in <somewhere.com|project_name>: '\ - '*Issue title*') + '<somewhere.com|[project_name>] Issue opened by Test User') expect(subject.attachments).to eq([ { + title: "#100 Issue title", + title_link: "url", text: "issue description", color: color, } @@ -56,10 +57,10 @@ describe SlackService::IssueMessage, models: true do args[:object_attributes][:action] = 'close' args[:object_attributes][:state] = 'closed' end + it 'returns a message regarding closing of issues' do expect(subject.pretext). to eq( - 'Test User closed <url|issue #100> in <somewhere.com|project_name>: '\ - '*Issue title*') + '<somewhere.com|[project_name>] Issue <url|#100 Issue title> closed by Test User') expect(subject.attachments).to be_empty end end |