spec/acceptance/rest/channel_spec.rb in ably-0.8.15 vs spec/acceptance/rest/channel_spec.rb in ably-1.0.0

- old
+ new

@@ -82,11 +82,11 @@ end end context 'without adequate permissions on the channel' do let(:capability) { { onlyChannel: ['subscribe'] } } - let(:client_options) { default_options.merge(use_token_auth: true, token_params: { capability: capability }) } + let(:client_options) { default_options.merge(use_token_auth: true, default_token_params: { capability: capability }) } it 'raises a permission error when publishing' do expect { channel.publish(name, data) }.to raise_error(Ably::Exceptions::UnauthorizedRequest, /not permitted/) end end @@ -373,10 +373,9 @@ describe ":#{option}", :webmock do let!(:history_stub) { query_params = default_history_options .merge(option => milliseconds).map { |k, v| "#{k}=#{v}" }.join('&') stub_request(:get, "#{endpoint}/channels/#{Addressable::URI.encode(channel_name)}/messages?#{query_params}"). - with(basic_auth: [key_name, key_secret]). to_return(:body => '{}', :headers => { 'Content-Type' => 'application/json' }) } before do channel.history(options)