spec/cli/sub_spec.rb in routemaster-client-3.1.1 vs spec/cli/sub_spec.rb in routemaster-client-3.1.2
- old
+ new
@@ -7,29 +7,29 @@
describe 'add' do
context 'with correct arguments' do
let(:argv) { %w[sub add https://my-service.dev cats dogs -b bus.dev -t s3cr3t] }
- it {
- expect(client).to receive(:subscribe).with(topics: %w[cats dogs], callback: 'https://my-service.dev')
+ it {
+ expect(client).to receive(:subscribe).with(topics: %w[cats dogs], callback: 'https://my-service.dev', uuid: 's3cr3t')
perform
}
end
end
describe 'del' do
context 'with a list of topics' do
let(:argv) { %w[sub del cats dogs -b bus.dev -t s3cr3t] }
- it {
+ it {
expect(client).to receive(:unsubscribe).with('cats', 'dogs')
perform
}
end
context 'without arguments' do
let(:argv) { %w[sub del -b bus.dev -t s3cr3t] }
- it {
+ it {
expect(client).to receive(:unsubscribe_all).with(no_args)
perform
}
end
end
@@ -47,10 +47,10 @@
'queued' => 1234
})
])
}
- it {
+ it {
expect(client).to receive(:monitor_subscriptions).with(no_args)
perform
}
it {
expect { perform }.to change { stdout.string }.to a_string_matching(/service--f000-b44r-b44r/)