fixtures/rails4/test/functional/users_controller_test.rb in rabl-0.11.0 vs fixtures/rails4/test/functional/users_controller_test.rb in rabl-0.11.1

- old
+ new

@@ -33,11 +33,11 @@ end.equals { @users.map(&:location) } # Attributes (custom name) asserts("contains registered_at") do json_output.map { |u| u["user"]["registered_at"] } - end.equals { @users.map(&:created_at).map(&:utc).map(&:to_s) } + end.equals { @users.map(&:created_at).map { |t| t.iso8601(3) } } # Node (renders based on attribute) asserts("contains role") do json_output.map { |u| u["user"]["role"] } end.equals ['normal', 'normal', 'admin'] @@ -62,10 +62,10 @@ # Attributes (regular) asserts("contains username") { json_output["person"]["username"] }.equals { @user1.username } asserts("contains email") { json_output["person"]["email"] }.equals { @user1.email } asserts("contains location") { json_output["person"]["location"] }.equals { @user1.location } # Attributes (custom name) - asserts("contains registered_at") { json_output["person"]["registered_at"] }.equals { @user1.created_at.utc.to_s } + asserts("contains registered_at") { json_output["person"]["registered_at"] }.equals { @user1.created_at.iso8601(3) } # Node (renders based on attribute) asserts("contains role node") { json_output["person"]["role"] }.equals "normal" # Child (custom collection name) asserts("contains first phone number") {