summaryrefslogtreecommitdiff
path: root/spec/models/broadcast_message_spec.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-05-19 15:44:42 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-05-19 15:44:42 +0000
commit4555e1b21c365ed8303ffb7a3325d773c9b8bf31 (patch)
tree5423a1c7516cffe36384133ade12572cf709398d /spec/models/broadcast_message_spec.rb
parente570267f2f6b326480d284e0164a6464ba4081bc (diff)
downloadgitlab-ce-4555e1b21c365ed8303ffb7a3325d773c9b8bf31.tar.gz
Add latest changes from gitlab-org/gitlab@13-12-stable-eev13.12.0-rc42
Diffstat (limited to 'spec/models/broadcast_message_spec.rb')
-rw-r--r--spec/models/broadcast_message_spec.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/models/broadcast_message_spec.rb b/spec/models/broadcast_message_spec.rb
index c4d17905637..d981189c6f1 100644
--- a/spec/models/broadcast_message_spec.rb
+++ b/spec/models/broadcast_message_spec.rb
@@ -120,6 +120,12 @@ RSpec.describe BroadcastMessage do
expect(subject.call('/users/name/issues').length).to eq(1)
end
+ it 'returns message if provided a path without a preceding slash' do
+ create(:broadcast_message, target_path: "/users/*/issues", broadcast_type: broadcast_type)
+
+ expect(subject.call('users/name/issues').length).to eq(1)
+ end
+
it 'returns the message for empty target path' do
create(:broadcast_message, target_path: "", broadcast_type: broadcast_type)