mirror of
https://github.com/internetee/registry.git
synced 2025-06-08 13:44:47 +02:00
parent
4a4fe14ebe
commit
36487a0c51
1 changed files with 17 additions and 0 deletions
17
test/models/message_test.rb
Normal file
17
test/models/message_test.rb
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
require 'test_helper'
|
||||||
|
|
||||||
|
class MessageTest < ActiveSupport::TestCase
|
||||||
|
def setup
|
||||||
|
@message = messages(:greeting)
|
||||||
|
end
|
||||||
|
|
||||||
|
def test_valid
|
||||||
|
assert @message.valid?
|
||||||
|
end
|
||||||
|
|
||||||
|
def test_invalid_without_body
|
||||||
|
@message.body = nil
|
||||||
|
@message.validate
|
||||||
|
assert @message.invalid?
|
||||||
|
end
|
||||||
|
end
|
Loading…
Add table
Add a link
Reference in a new issue