Commit 3b3c447ee060285b4200aabc116e3a430ba07623
1 parent
cd3edc92
Exists in
master
and in
15 other branches
removes a scope comparison with Relation
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,7 +181,6 @@ class CustomFormsPlugin::FormTest < ActiveSupport::TestCase | ||
181 | f3 = CustomFormsPlugin::Form.create!(:name => 'Free Software', :profile => another_profile) | 181 | f3 = CustomFormsPlugin::Form.create!(:name => 'Free Software', :profile => another_profile) |
182 | scope = CustomFormsPlugin::Form.from_profile(profile) | 182 | scope = CustomFormsPlugin::Form.from_profile(profile) |
183 | 183 | ||
184 | - assert_equal ActiveRecord::Relation, scope.class | ||
185 | assert_includes scope, f1 | 184 | assert_includes scope, f1 |
186 | assert_includes scope, f2 | 185 | assert_includes scope, f2 |
187 | assert_not_includes scope, f3 | 186 | assert_not_includes scope, f3 |
@@ -194,7 +193,6 @@ class CustomFormsPlugin::FormTest < ActiveSupport::TestCase | @@ -194,7 +193,6 @@ class CustomFormsPlugin::FormTest < ActiveSupport::TestCase | ||
194 | f3 = CustomFormsPlugin::Form.create!(:name => 'Not on memberhsip', :profile => profile, :on_membership => false) | 193 | f3 = CustomFormsPlugin::Form.create!(:name => 'Not on memberhsip', :profile => profile, :on_membership => false) |
195 | scope = CustomFormsPlugin::Form.from_profile(profile).on_memberships | 194 | scope = CustomFormsPlugin::Form.from_profile(profile).on_memberships |
196 | 195 | ||
197 | - assert_equal ActiveRecord::Relation, scope.class | ||
198 | assert_includes scope, f1 | 196 | assert_includes scope, f1 |
199 | assert_includes scope, f2 | 197 | assert_includes scope, f2 |
200 | assert_not_includes scope, f3 | 198 | assert_not_includes scope, f3 |
@@ -225,7 +223,6 @@ class CustomFormsPlugin::FormTest < ActiveSupport::TestCase | @@ -225,7 +223,6 @@ class CustomFormsPlugin::FormTest < ActiveSupport::TestCase | ||
225 | f3 = CustomFormsPlugin::Form.create!(:name => 'Not for admission', :profile => profile, :for_admission => false) | 223 | f3 = CustomFormsPlugin::Form.create!(:name => 'Not for admission', :profile => profile, :for_admission => false) |
226 | scope = CustomFormsPlugin::Form.from_profile(profile).for_admissions | 224 | scope = CustomFormsPlugin::Form.from_profile(profile).for_admissions |
227 | 225 | ||
228 | - assert_equal ActiveRecord::Relation, scope.class | ||
229 | assert_includes scope, f1 | 226 | assert_includes scope, f1 |
230 | assert_includes scope, f2 | 227 | assert_includes scope, f2 |
231 | assert_not_includes scope, f3 | 228 | assert_not_includes scope, f3 |
@@ -237,7 +234,6 @@ class CustomFormsPlugin::FormTest < ActiveSupport::TestCase | @@ -237,7 +234,6 @@ class CustomFormsPlugin::FormTest < ActiveSupport::TestCase | ||
237 | f2 = CustomFormsPlugin::Form.create!(:name => 'For admission', :profile => profile, :on_membership => true, :for_admission => true) | 234 | f2 = CustomFormsPlugin::Form.create!(:name => 'For admission', :profile => profile, :on_membership => true, :for_admission => true) |
238 | scope = CustomFormsPlugin::Form.from_profile(profile).on_memberships | 235 | scope = CustomFormsPlugin::Form.from_profile(profile).on_memberships |
239 | 236 | ||
240 | - assert_equal ActiveRecord::Relation, scope.class | ||
241 | assert_includes scope, f1 | 237 | assert_includes scope, f1 |
242 | assert_not_includes scope, f2 | 238 | assert_not_includes scope, f2 |
243 | end | 239 | end |
plugins/custom_forms/test/unit/custom_forms_plugin/membership_survey_test.rb
@@ -37,7 +37,6 @@ class CustomFormsPlugin::MembershipSurveyTest < ActiveSupport::TestCase | @@ -37,7 +37,6 @@ class CustomFormsPlugin::MembershipSurveyTest < ActiveSupport::TestCase | ||
37 | task2 = CustomFormsPlugin::MembershipSurvey.create!(:form_id => form.id, :target => person, :requestor => fast_create(Profile)) | 37 | task2 = CustomFormsPlugin::MembershipSurvey.create!(:form_id => form.id, :target => person, :requestor => fast_create(Profile)) |
38 | scope = CustomFormsPlugin::MembershipSurvey.from_profile(profile) | 38 | scope = CustomFormsPlugin::MembershipSurvey.from_profile(profile) |
39 | 39 | ||
40 | - assert_equal ActiveRecord::Relation, scope.class | ||
41 | assert_includes scope, task1 | 40 | assert_includes scope, task1 |
42 | assert_not_includes scope, task2 | 41 | assert_not_includes scope, task2 |
43 | end | 42 | end |