Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test failing when running locally #1023

Closed
scarroll32 opened this issue May 17, 2019 · 2 comments
Closed

Test failing when running locally #1023

scarroll32 opened this issue May 17, 2019 · 2 comments
Assignees

Comments

@scarroll32
Copy link
Member

Tests are failing when run on local machine.

Failures:

  1) Ransack::Adapters::ActiveRecord::Context#build_correlated_subquery build correlated subquery for Root STI model
     Failure/Error: expect(constraint.left.name).to eql 'person_id'

     NoMethodError:
       undefined method `name' for #<Arel::Nodes::Grouping:0x00007fdcb1510a78>
     # ./spec/ransack/adapters/active_record/context_spec.rb:51:in `block (3 levels) in <module:ActiveRecord>'

  2) Ransack::Adapters::ActiveRecord::Context#build_correlated_subquery build correlated subquery for Child STI model when predicate is not_eq
     Failure/Error: expect(constraint.left.relation.name).to eql 'articles'

     NoMethodError:
       undefined method `relation' for #<Arel::Nodes::Grouping:0x00007fdcb14e7e98>
     # ./spec/ransack/adapters/active_record/context_spec.rb:64:in `block (3 levels) in <module:ActiveRecord>'

  3) Ransack::Adapters::ActiveRecord::Context#build_correlated_subquery build correlated subquery for Child STI model when predicate is eq
     Failure/Error: expect(constraint.left.relation.name).to eql 'articles'

     NoMethodError:
       undefined method `relation' for #<Arel::Nodes::Grouping:0x00007fdcb14d7ef8>
     # ./spec/ransack/adapters/active_record/context_spec.rb:77:in `block (3 levels) in <module:ActiveRecord>'

  4) Ransack::Search#result use appropriate table alias
     Failure/Error:
       expect(real_query)
         .to include "LEFT OUTER JOIN articles ON articles.person_id = people.id"

       expected "SELECT people.* FROM people LEFT OUTER JOIN articles ON ('default_scope' = 'default_scope') AND arti...rent_name_query' AND articles_people.title = 'parents_article_title_query') ORDER BY people.id DESC" to include "LEFT OUTER JOIN articles ON articles.person_id = people.id"
     # ./spec/ransack/search_spec.rb:240:in `block (3 levels) in <module:Ransack>'

Finished in 1.69 seconds (files took 1.11 seconds to load)
350 examples, 4 failures

Failed examples:

rspec ./spec/ransack/adapters/active_record/context_spec.rb:44 # Ransack::Adapters::ActiveRecord::Context#build_correlated_subquery build correlated subquery for Root STI model
rspec ./spec/ransack/adapters/active_record/context_spec.rb:57 # Ransack::Adapters::ActiveRecord::Context#build_correlated_subquery build correlated subquery for Child STI model when predicate is not_eq

It seems the 5.2 tests are allowed to fail in Travis. This should be corrected ... I will look into it.

Screenshot 2019-05-17 at 10 07 47

@scarroll32 scarroll32 self-assigned this May 17, 2019
@gregmolnar
Copy link
Member

Those are allowed to fail since even minor ActiveRecord releases break Ransack often.

@scarroll32
Copy link
Member Author

scarroll32 commented May 18, 2019

OK, I will try to resolve this. I should have a bit of time to work on Ransack in June.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants