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

Fixed test issue for test_injection: expected SQL was reversed. #3

Merged
merged 1 commit into from May 2, 2011
Merged

Fixed test issue for test_injection: expected SQL was reversed. #3

merged 1 commit into from May 2, 2011

Conversation

afriqs
Copy link

@afriqs afriqs commented Apr 28, 2011

Tested with Active Record v2.3.11.

@@ -534,7 +534,7 @@ class ArrayScopeListTest < Test::Unit::TestCase

def test_injection
item = ArrayScopeListMixin.new(:parent_id => 1, :parent_type => 'ParentClass')
assert_equal '"mixins"."parent_id" = 1 AND "mixins"."parent_type" = \'ParentClass\'', item.scope_condition
assert_equal '"mixins"."parent_type" = \'ParentClass\' AND "mixins"."parent_id" = 1', item.scope_condition
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error was :

  1. Failure:
    test_injection(ArrayScopeListTest) [./test/list_test.rb:537]:
    <""mixins"."parent_id" = 1 AND "mixins"."parent_type" = 'ParentClass'"> expected but was <""mixins"."parent_type" = 'ParentClass' AND "mixins"."parent_id" = 1">.

swanandp added a commit that referenced this pull request May 2, 2011
Fixed test issue for test_injection: expected SQL was reversed. (Author: https://github.com/afriqs )
@swanandp swanandp merged commit 2ccbc77 into brendon:master May 2, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants