Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions spec/render_jsonapi_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def jsonapi_cache_key(*)
end

def user
OpenStruct.new(id: 1, name: 'Johnny Cache', dob: Time.new(2021,1,1))
OpenStruct.new(id: 1, name: 'Johnny Cache', dob: Time.utc(2021,1,1))
end

def index
Expand Down Expand Up @@ -72,7 +72,7 @@ def index_with_caching

it 'renders equivalent JSON whether caching or not' do
expected_response = {
"data"=>[{"id"=>"1", "type"=>"users", "attributes"=>{"id"=>1, "name"=>"Johnny Cache", "dob"=>"2021-01-01T00:00:00.000+00:00"}}],
"data"=>[{"id"=>"1", "type"=>"users", "attributes"=>{"id"=>1, "name"=>"Johnny Cache", "dob"=>"2021-01-01T00:00:00.000Z"}}],
"jsonapi"=>{"version"=>"1.0"}
}

Expand Down