diff options
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/integrations/chat_message/push_message_spec.rb | 24 | ||||
-rw-r--r-- | spec/models/integrations/discord_spec.rb | 2 |
2 files changed, 13 insertions, 13 deletions
diff --git a/spec/models/integrations/chat_message/push_message_spec.rb b/spec/models/integrations/chat_message/push_message_spec.rb index 8d2d0f9f9a8..5c9c5c64d7e 100644 --- a/spec/models/integrations/chat_message/push_message_spec.rb +++ b/spec/models/integrations/chat_message/push_message_spec.rb @@ -38,8 +38,8 @@ RSpec.describe Integrations::ChatMessage::PushMessage do context 'without markdown' do it 'returns a message regarding pushes' do expect(subject.pretext).to eq( - 'test.user pushed to branch <http://url.com/commits/master|master> of '\ - '<http://url.com|project_name> (<http://url.com/compare/before...after|Compare changes>)') + 'test.user pushed to branch <http://url.com/-/commits/master|master> of '\ + '<http://url.com|project_name> (<http://url.com/-/compare/before...after|Compare changes>)') expect(subject.attachments).to eq([{ text: "<http://url1.com|abcdefgh>: message1 - author1\n\n"\ "<http://url2.com|12345678>: message2 w w w w w w w w w w w w w w w w w w w w w w w w w w w w w w w w w w ... - author2", @@ -55,13 +55,13 @@ RSpec.describe Integrations::ChatMessage::PushMessage do it 'returns a message regarding pushes' do expect(subject.pretext).to eq( - 'test.user pushed to branch [master](http://url.com/commits/master) of [project_name](http://url.com) ([Compare changes](http://url.com/compare/before...after))') + 'test.user pushed to branch [master](http://url.com/-/commits/master) of [project_name](http://url.com) ([Compare changes](http://url.com/-/compare/before...after))') expect(subject.attachments).to eq( "[abcdefgh](http://url1.com): message1 - author1\n\n[12345678](http://url2.com): message2 w w w w w w w w w w w w w w w w w w w w w w w w w w w w w w w w w w ... - author2") expect(subject.activity).to eq( - title: 'test.user pushed to branch [master](http://url.com/commits/master)', + title: 'test.user pushed to branch [master](http://url.com/-/commits/master)', subtitle: 'in [project_name](http://url.com)', - text: '[Compare changes](http://url.com/compare/before...after)', + text: '[Compare changes](http://url.com/-/compare/before...after)', image: 'http://someavatar.com' ) end @@ -102,7 +102,7 @@ RSpec.describe Integrations::ChatMessage::PushMessage do expect(subject.activity).to eq( title: 'test.user pushed new tag [new_tag](http://url.com/-/tags/new_tag)', subtitle: 'in [project_name](http://url.com)', - text: '[Compare changes](http://url.com/compare/0000000000000000000000000000000000000000...after)', + text: '[Compare changes](http://url.com/-/compare/0000000000000000000000000000000000000000...after)', image: 'http://someavatar.com' ) end @@ -143,7 +143,7 @@ RSpec.describe Integrations::ChatMessage::PushMessage do expect(subject.activity).to eq( title: 'test.user removed tag new_tag', subtitle: 'in [project_name](http://url.com)', - text: '[Compare changes](http://url.com/compare/before...0000000000000000000000000000000000000000)', + text: '[Compare changes](http://url.com/-/compare/before...0000000000000000000000000000000000000000)', image: 'http://someavatar.com' ) end @@ -158,7 +158,7 @@ RSpec.describe Integrations::ChatMessage::PushMessage do context 'without markdown' do it 'returns a message regarding a new branch' do expect(subject.pretext).to eq( - 'test.user pushed new branch <http://url.com/commits/master|master> to '\ + 'test.user pushed new branch <http://url.com/-/commits/master|master> to '\ '<http://url.com|project_name>') expect(subject.attachments).to be_empty end @@ -171,12 +171,12 @@ RSpec.describe Integrations::ChatMessage::PushMessage do it 'returns a message regarding a new branch' do expect(subject.pretext).to eq( - 'test.user pushed new branch [master](http://url.com/commits/master) to [project_name](http://url.com)') + 'test.user pushed new branch [master](http://url.com/-/commits/master) to [project_name](http://url.com)') expect(subject.attachments).to be_empty expect(subject.activity).to eq( - title: 'test.user pushed new branch [master](http://url.com/commits/master)', + title: 'test.user pushed new branch [master](http://url.com/-/commits/master)', subtitle: 'in [project_name](http://url.com)', - text: '[Compare changes](http://url.com/compare/0000000000000000000000000000000000000000...after)', + text: '[Compare changes](http://url.com/-/compare/0000000000000000000000000000000000000000...after)', image: 'http://someavatar.com' ) end @@ -208,7 +208,7 @@ RSpec.describe Integrations::ChatMessage::PushMessage do expect(subject.activity).to eq( title: 'test.user removed branch master', subtitle: 'in [project_name](http://url.com)', - text: '[Compare changes](http://url.com/compare/before...0000000000000000000000000000000000000000)', + text: '[Compare changes](http://url.com/-/compare/before...0000000000000000000000000000000000000000)', image: 'http://someavatar.com' ) end diff --git a/spec/models/integrations/discord_spec.rb b/spec/models/integrations/discord_spec.rb index 138a56d1872..42ea4a287fe 100644 --- a/spec/models/integrations/discord_spec.rb +++ b/spec/models/integrations/discord_spec.rb @@ -52,7 +52,7 @@ RSpec.describe Integrations::Discord do subject.execute(sample_data) expect(builder.to_json_hash[:embeds].first).to include( - description: start_with("#{user.name} pushed to branch [master](http://localhost/#{project.namespace.path}/#{project.path}/commits/master) of"), + description: start_with("#{user.name} pushed to branch [master](http://localhost/#{project.namespace.path}/#{project.path}/-/commits/master) of"), author: hash_including( icon_url: start_with('https://www.gravatar.com/avatar/'), name: user.name |