2016-09-28 20:18:52 +08:00
|
|
|
require 'test_helper'
|
|
|
|
|
|
|
|
class NotificationTest < ActiveSupport::TestCase
|
|
|
|
should have_db_column(:title).of_type(:string)
|
2016-10-06 17:40:01 +08:00
|
|
|
should have_db_column(:message).of_type(:string)
|
2016-09-28 20:18:52 +08:00
|
|
|
should have_db_column(:type_of).of_type(:integer)
|
|
|
|
should have_db_column(:created_at).of_type(:datetime)
|
|
|
|
should have_db_column(:updated_at).of_type(:datetime)
|
2016-10-06 17:40:01 +08:00
|
|
|
should have_db_column(:generator_user_id)
|
2016-09-28 20:18:52 +08:00
|
|
|
|
|
|
|
should have_many(:user_notifications)
|
|
|
|
should have_many(:users)
|
2016-10-06 17:40:01 +08:00
|
|
|
should belong_to(:generator_user).class_name('User')
|
2016-09-28 20:18:52 +08:00
|
|
|
end
|