mirror of
https://github.com/CodeforLeipzig/stadtratmonitor.git
synced 2025-04-20 07:11:33 +02:00
Add paper validation tests
This commit is contained in:
parent
3b4f158ea5
commit
d5849c2bea
3 changed files with 19 additions and 4 deletions
16
test/models/paper_test.rb
Normal file
16
test/models/paper_test.rb
Normal file
|
@ -0,0 +1,16 @@
|
|||
require 'test_helper'
|
||||
|
||||
class PaperTest < ActiveSupport::TestCase
|
||||
|
||||
context "Validations" do
|
||||
should validate_presence_of(:body)
|
||||
should validate_presence_of(:content)
|
||||
should validate_presence_of(:name)
|
||||
should validate_presence_of(:originator)
|
||||
should validate_presence_of(:paper_type)
|
||||
should validate_presence_of(:reference)
|
||||
should validate_presence_of(:url)
|
||||
should validate_presence_of(:published_at)
|
||||
end
|
||||
|
||||
end
|
|
@ -5,7 +5,7 @@ require 'capybara/rails'
|
|||
|
||||
class ActiveSupport::TestCase
|
||||
# Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order.
|
||||
fixtures :all
|
||||
# fixtures :all
|
||||
|
||||
# Add more helper methods to be used by all tests here...
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue