aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/api
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2015-04-21 16:15:45 -0400
committerSantiago Pastorino <santiago@wyeworks.com>2015-06-11 16:54:13 -0300
commit4c1b437ed7dea3660065c03e5e056a8aac700e21 (patch)
tree1daf4cfd8185a14ea5190bfaf8da0bb01786d85a /actionpack/test/controller/api
parent3d3730040dba728912a42cd6a571042833f93cee (diff)
downloadrails-4c1b437ed7dea3660065c03e5e056a8aac700e21.tar.gz
rails-4c1b437ed7dea3660065c03e5e056a8aac700e21.tar.bz2
rails-4c1b437ed7dea3660065c03e5e056a8aac700e21.zip
Use nex hash syntax on tests
Diffstat (limited to 'actionpack/test/controller/api')
-rw-r--r--actionpack/test/controller/api/conditional_get_test.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/actionpack/test/controller/api/conditional_get_test.rb b/actionpack/test/controller/api/conditional_get_test.rb
index e729ea9d33..3863e2a45d 100644
--- a/actionpack/test/controller/api/conditional_get_test.rb
+++ b/actionpack/test/controller/api/conditional_get_test.rb
@@ -3,22 +3,22 @@ require 'active_support/core_ext/integer/time'
require 'active_support/core_ext/numeric/time'
class ConditionalGetApiController < ActionController::API
- before_action :handle_last_modified_and_etags, :only => :two
+ before_action :handle_last_modified_and_etags, only: :two
def one
- if stale?(:last_modified => Time.now.utc.beginning_of_day, :etag => [:foo, 123])
- render :text => "Hi!"
+ if stale?(last_modified: Time.now.utc.beginning_of_day, etag: [:foo, 123])
+ render text: "Hi!"
end
end
def two
- render :text => "Hi!"
+ render text: "Hi!"
end
private
def handle_last_modified_and_etags
- fresh_when(:last_modified => Time.now.utc.beginning_of_day, :etag => [ :foo, 123 ])
+ fresh_when(last_modified: Time.now.utc.beginning_of_day, etag: [ :foo, 123 ])
end
end