]> git.openstreetmap.org Git - rails.git/blobdiff - test/models/client_application_test.rb
Merge remote-tracking branch 'upstream/pull/4251'
[rails.git] / test / models / client_application_test.rb
index c0b7b7977fcd6d84a7e4b6c5a9422768c5caccce..9dc5ab5fc4c9b7258e29ddabe1275c76aa466e55 100644 (file)
@@ -8,13 +8,13 @@ class ClientApplicationTest < ActiveSupport::TestCase
     ok.each do |url|
       app = build(:client_application)
       app.url = url
-      assert app.valid?, "#{url} is invalid, when it should be"
+      assert_predicate app, :valid?, "#{url} is invalid, when it should be"
     end
 
     bad.each do |url|
       app = build(:client_application)
       app.url = url
-      assert_not app.valid?, "#{url} is valid when it shouldn't be"
+      assert_not_predicate app, :valid?, "#{url} is valid when it shouldn't be"
     end
   end
 
@@ -25,13 +25,13 @@ class ClientApplicationTest < ActiveSupport::TestCase
     ok.each do |url|
       app = build(:client_application)
       app.support_url = url
-      assert app.valid?, "#{url} is invalid, when it should be"
+      assert_predicate app, :valid?, "#{url} is invalid, when it should be"
     end
 
     bad.each do |url|
       app = build(:client_application)
       app.support_url = url
-      assert_not app.valid?, "#{url} is valid when it shouldn't be"
+      assert_not_predicate app, :valid?, "#{url} is valid when it shouldn't be"
     end
   end
 
@@ -42,13 +42,13 @@ class ClientApplicationTest < ActiveSupport::TestCase
     ok.each do |url|
       app = build(:client_application)
       app.callback_url = url
-      assert app.valid?, "#{url} is invalid, when it should be"
+      assert_predicate app, :valid?, "#{url} is invalid, when it should be"
     end
 
     bad.each do |url|
       app = build(:client_application)
       app.callback_url = url
-      assert_not app.valid?, "#{url} is valid when it shouldn't be"
+      assert_not_predicate app, :valid?, "#{url} is valid when it shouldn't be"
     end
   end
 end