aboutsummaryrefslogtreecommitdiffstats
path: root/actioncable/test
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2016-08-06 19:44:11 +0200
committerXavier Noria <fxn@hashref.com>2016-08-06 19:44:11 +0200
commit411ccbdab2608c62aabdb320d52cb02d446bb39c (patch)
tree05671553ac2a23dd1db4d11949c1ac43c3dd1367 /actioncable/test
parent60b67d76dc1d98e4269aac7705e9d8323eb42942 (diff)
downloadrails-411ccbdab2608c62aabdb320d52cb02d446bb39c.tar.gz
rails-411ccbdab2608c62aabdb320d52cb02d446bb39c.tar.bz2
rails-411ccbdab2608c62aabdb320d52cb02d446bb39c.zip
remove redundant curlies from hash arguments
Diffstat (limited to 'actioncable/test')
-rw-r--r--actioncable/test/channel/base_test.rb2
-rw-r--r--actioncable/test/channel/periodic_timers_test.rb2
-rw-r--r--actioncable/test/channel/rejection_test.rb2
-rw-r--r--actioncable/test/channel/stream_test.rb4
-rw-r--r--actioncable/test/connection/base_test.rb4
5 files changed, 7 insertions, 7 deletions
diff --git a/actioncable/test/channel/base_test.rb b/actioncable/test/channel/base_test.rb
index 67200ce3ce..69bbeb7818 100644
--- a/actioncable/test/channel/base_test.rb
+++ b/actioncable/test/channel/base_test.rb
@@ -74,7 +74,7 @@ class ActionCable::Channel::BaseTest < ActiveSupport::TestCase
setup do
@user = User.new "lifo"
@connection = TestConnection.new(@user)
- @channel = ChatChannel.new @connection, "{id: 1}", { id: 1 }
+ @channel = ChatChannel.new @connection, "{id: 1}", id: 1
end
test "should subscribe to a channel on initialize" do
diff --git a/actioncable/test/channel/periodic_timers_test.rb b/actioncable/test/channel/periodic_timers_test.rb
index 55e96503ff..529abb9535 100644
--- a/actioncable/test/channel/periodic_timers_test.rb
+++ b/actioncable/test/channel/periodic_timers_test.rb
@@ -60,7 +60,7 @@ class ActionCable::Channel::PeriodicTimersTest < ActiveSupport::TestCase
test "timer start and stop" do
@connection.server.event_loop.expects(:timer).times(3).returns(stub(shutdown: nil))
- channel = ChatChannel.new @connection, "{id: 1}", { id: 1 }
+ channel = ChatChannel.new @connection, "{id: 1}", id: 1
channel.unsubscribe_from_channel
assert_equal [], channel.send(:active_periodic_timers)
diff --git a/actioncable/test/channel/rejection_test.rb b/actioncable/test/channel/rejection_test.rb
index 9e011dee71..cfeb22889c 100644
--- a/actioncable/test/channel/rejection_test.rb
+++ b/actioncable/test/channel/rejection_test.rb
@@ -16,7 +16,7 @@ class ActionCable::Channel::RejectionTest < ActiveSupport::TestCase
test "subscription rejection" do
@connection.expects(:subscriptions).returns mock().tap { |m| m.expects(:remove_subscription).with instance_of(SecretChannel) }
- @channel = SecretChannel.new @connection, "{id: 1}", { id: 1 }
+ @channel = SecretChannel.new @connection, "{id: 1}", id: 1
expected = { "identifier" => "{id: 1}", "type" => "reject_subscription" }
assert_equal expected, @connection.last_transmission
diff --git a/actioncable/test/channel/stream_test.rb b/actioncable/test/channel/stream_test.rb
index e56f5a7254..da26f81a5c 100644
--- a/actioncable/test/channel/stream_test.rb
+++ b/actioncable/test/channel/stream_test.rb
@@ -52,7 +52,7 @@ module ActionCable::StreamTests
run_in_eventmachine do
connection = TestConnection.new
connection.expects(:pubsub).returns mock().tap { |m| m.expects(:subscribe).with("test_room_1", kind_of(Proc), kind_of(Proc)).returns stub_everything(:pubsub) }
- channel = ChatChannel.new connection, "{id: 1}", { id: 1 }
+ channel = ChatChannel.new connection, "{id: 1}", id: 1
connection.expects(:pubsub).returns mock().tap { |m| m.expects(:unsubscribe) }
channel.unsubscribe_from_channel
@@ -84,7 +84,7 @@ module ActionCable::StreamTests
run_in_eventmachine do
connection = TestConnection.new
- ChatChannel.new connection, "{id: 1}", { id: 1 }
+ ChatChannel.new connection, "{id: 1}", id: 1
assert_nil connection.last_transmission
wait_for_async
diff --git a/actioncable/test/connection/base_test.rb b/actioncable/test/connection/base_test.rb
index 43bb03a4fe..9bcd0700cf 100644
--- a/actioncable/test/connection/base_test.rb
+++ b/actioncable/test/connection/base_test.rb
@@ -119,8 +119,8 @@ class ActionCable::Connection::BaseTest < ActionCable::TestCase
env = Rack::MockRequest.env_for(
"/test",
- { "HTTP_CONNECTION" => "upgrade", "HTTP_UPGRADE" => "websocket",
- "HTTP_HOST" => "localhost", "HTTP_ORIGIN" => "http://rubyonrails.org", "rack.hijack" => CallMeMaybe.new }
+ "HTTP_CONNECTION" => "upgrade", "HTTP_UPGRADE" => "websocket",
+ "HTTP_HOST" => "localhost", "HTTP_ORIGIN" => "http://rubyonrails.org", "rack.hijack" => CallMeMaybe.new
)
connection = ActionCable::Connection::Base.new(@server, env)