spec/acceptance/realtime/client_spec.rb in ably-0.8.15 vs spec/acceptance/realtime/client_spec.rb in ably-1.0.0
- old
+ new
@@ -60,11 +60,11 @@
end
context 'with valid :key and :use_token_auth option set to true' do
let(:client_options) { default_options.merge(use_token_auth: true) }
- it 'automatically authorises on connect and generates a token' do
+ it 'automatically authorizes on connect and generates a token' do
connection.on(:connected) do
expect(subject.auth.current_token_details).to_not be_nil
expect(auth_params[:access_token]).to_not be_nil
stop_reactor
end
@@ -114,20 +114,20 @@
end
end
context 'when the returned token has a client_id' do
it "sets Auth#client_id to the new token's client_id immediately when connecting" do
- subject.auth.authorise do
- expect(subject.connection).to be_connecting
+ subject.auth.authorize do
+ expect(subject.connection).to be_connected
expect(subject.auth.client_id).to eql(client_id)
stop_reactor
end
end
it "sets Client#client_id to the new token's client_id immediately when connecting" do
- subject.auth.authorise do
- expect(subject.connection).to be_connecting
+ subject.auth.authorize do
+ expect(subject.connection).to be_connected
expect(subject.client_id).to eql(client_id)
stop_reactor
end
end
end
@@ -257,10 +257,10 @@
context 'paged results' do
let(:channel_name) { random_str }
it 'provides paging' do
10.times do
- subject.rest_client.request(:post, "/channels/#{channel_name}/publish", {}, { 'name': 'test' })
+ subject.rest_client.request(:post, "/channels/#{channel_name}/publish", {}, { 'name' => 'test' })
end
subject.request(:get, "/channels/#{channel_name}/messages", { limit: 2 }).callback do |response|
expect(response.items.length).to eql(2)
expect(response).to be_has_next