From a5ed74240f0d493c14ee9f024aaa2cc719bf6be1 Mon Sep 17 00:00:00 2001 From: Mauricio Giacomini Girardello <mgg12@inf.ufpr.br> Date: Wed, 18 May 2016 10:48:52 -0300 Subject: [PATCH] testing application model --- test/models/application_test.rb | 6 +++--- test/models/user_test.rb | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/test/models/application_test.rb b/test/models/application_test.rb index eac1b1d4..f959b7a8 100644 --- a/test/models/application_test.rb +++ b/test/models/application_test.rb @@ -1,7 +1,7 @@ require 'test_helper' class ApplicationTest < ActiveSupport::TestCase - # test "the truth" do - # assert true - # end + should belong_to :user + should validate_presence_of(:domain) + should validate_presence_of(:application_id) end diff --git a/test/models/user_test.rb b/test/models/user_test.rb index bcf2ab2b..86e0c5ce 100644 --- a/test/models/user_test.rb +++ b/test/models/user_test.rb @@ -51,6 +51,7 @@ class UserTest < ActiveSupport::TestCase should have_many :shares should have_many :follows should have_many :reviews + should have_many :applications test 'an user can follow another user' do john = users(:john) -- GitLab