summaryrefslogtreecommitdiff
path: root/spec/models/broadcast_message_spec.rb
diff options
context:
space:
mode:
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 fc463c6af52..c4d17905637 100644
--- a/spec/models/broadcast_message_spec.rb
+++ b/spec/models/broadcast_message_spec.rb
@@ -161,6 +161,12 @@ RSpec.describe BroadcastMessage do
expect(subject.call('/group/issues/test').length).to eq(1)
end
+
+ it "does not return message if the target path is set but no current path is provided" do
+ create(:broadcast_message, target_path: "*/issues/*", broadcast_type: broadcast_type)
+
+ expect(subject.call.length).to eq(0)
+ end
end
describe '.current', :use_clean_rails_memory_store_caching do