Skip to content

Failing spec not on GMT #135

Closed
Closed
@tagliala

Description

@tagliala

How to reproduce

  1. Clone the repo
  2. Set the machine on a different time zone than GMT
  3. bundle
  4. rake
Failures:

  1) ActionController::Base#render when using a cache renders equivalent JSON whether caching or not
     Failure/Error: expect(response_with_no_caching).to eq expected_response
     
       expected: {"data"=>[{"attributes"=>{"dob"=>"2021-01-01T00:00:00.000+00:00", "id"=>1, "name"=>"Johnny Cache"}, "id"=>"1", "type"=>"users"}], "jsonapi"=>{"version"=>"1.0"}}
            got: {"data"=>[{"attributes"=>{"dob"=>"2021-01-01T00:00:00.000+01:00", "id"=>1, "name"=>"Johnny Cache"}, "id"=>"1", "type"=>"users"}], "jsonapi"=>{"version"=>"1.0"}}
     
       (compared using ==)
     
       Diff:
       @@ -1 +1 @@
       -"data" => [{"attributes"=>{"dob"=>"2021-01-01T00:00:00.000+00:00", "id"=>1, "name"=>"Johnny Cache"}, "id"=>"1", "type"=>"users"}],
       +"data" => [{"attributes"=>{"dob"=>"2021-01-01T00:00:00.000+01:00", "id"=>1, "name"=>"Johnny Cache"}, "id"=>"1", "type"=>"users"}],
       
     # ./spec/render_jsonapi_spec.rb:85:in `block (3 levels) in <top (required)>'

The difference is in the time zone, I'm on GMT + 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions