Commit 9907de143d684dfddbae1ee3377dd034b8b0c692
Exists in
master
and in
15 other branches
Merge branch 'fix_custom_forms_rails4' into 'master'
Fix custom forms tests "scope.class" returns a CustomFormsPlugin::Form::ActiveRecord_Relation class, which is a mismatch with ActiveRecord::Relation. Removed these assertions so we don't need to be attached to the name. The main assertions for each test remain unchanged. See merge request !768
Showing
2 changed files
with
0 additions
and
5 deletions
Show diff stats
plugins/custom_forms/test/unit/custom_forms_plugin/form_test.rb
| ... | ... | @@ -181,7 +181,6 @@ class CustomFormsPlugin::FormTest < ActiveSupport::TestCase |
| 181 | 181 | f3 = CustomFormsPlugin::Form.create!(:name => 'Free Software', :profile => another_profile) |
| 182 | 182 | scope = CustomFormsPlugin::Form.from_profile(profile) |
| 183 | 183 | |
| 184 | - assert_equal ActiveRecord::Relation, scope.class | |
| 185 | 184 | assert_includes scope, f1 |
| 186 | 185 | assert_includes scope, f2 |
| 187 | 186 | assert_not_includes scope, f3 |
| ... | ... | @@ -194,7 +193,6 @@ class CustomFormsPlugin::FormTest < ActiveSupport::TestCase |
| 194 | 193 | f3 = CustomFormsPlugin::Form.create!(:name => 'Not on memberhsip', :profile => profile, :on_membership => false) |
| 195 | 194 | scope = CustomFormsPlugin::Form.from_profile(profile).on_memberships |
| 196 | 195 | |
| 197 | - assert_equal ActiveRecord::Relation, scope.class | |
| 198 | 196 | assert_includes scope, f1 |
| 199 | 197 | assert_includes scope, f2 |
| 200 | 198 | assert_not_includes scope, f3 |
| ... | ... | @@ -225,7 +223,6 @@ class CustomFormsPlugin::FormTest < ActiveSupport::TestCase |
| 225 | 223 | f3 = CustomFormsPlugin::Form.create!(:name => 'Not for admission', :profile => profile, :for_admission => false) |
| 226 | 224 | scope = CustomFormsPlugin::Form.from_profile(profile).for_admissions |
| 227 | 225 | |
| 228 | - assert_equal ActiveRecord::Relation, scope.class | |
| 229 | 226 | assert_includes scope, f1 |
| 230 | 227 | assert_includes scope, f2 |
| 231 | 228 | assert_not_includes scope, f3 |
| ... | ... | @@ -237,7 +234,6 @@ class CustomFormsPlugin::FormTest < ActiveSupport::TestCase |
| 237 | 234 | f2 = CustomFormsPlugin::Form.create!(:name => 'For admission', :profile => profile, :on_membership => true, :for_admission => true) |
| 238 | 235 | scope = CustomFormsPlugin::Form.from_profile(profile).on_memberships |
| 239 | 236 | |
| 240 | - assert_equal ActiveRecord::Relation, scope.class | |
| 241 | 237 | assert_includes scope, f1 |
| 242 | 238 | assert_not_includes scope, f2 |
| 243 | 239 | end | ... | ... |
plugins/custom_forms/test/unit/custom_forms_plugin/membership_survey_test.rb
| ... | ... | @@ -37,7 +37,6 @@ class CustomFormsPlugin::MembershipSurveyTest < ActiveSupport::TestCase |
| 37 | 37 | task2 = CustomFormsPlugin::MembershipSurvey.create!(:form_id => form.id, :target => person, :requestor => fast_create(Profile)) |
| 38 | 38 | scope = CustomFormsPlugin::MembershipSurvey.from_profile(profile) |
| 39 | 39 | |
| 40 | - assert_equal ActiveRecord::Relation, scope.class | |
| 41 | 40 | assert_includes scope, task1 |
| 42 | 41 | assert_not_includes scope, task2 |
| 43 | 42 | end | ... | ... |