Cross Reference:
xref
: /
ontohub
/
test
/
unit
/
project_test.rb
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
project_test.rb revision 92c8f40524b3849c1964e357e13a4101b005c9ac
require
'test_helper'
class
ProjectTest
<
ActiveSupport
::
TestCase
context
'Migrations'
do
%w
(
name
institution
homepage
description
contact
)
.
each
do
|
column
|
should
have_db_column
(
column
)
.
of_type
(:
string
)
end
end
context
'Validations'
do
[
'
http://example.com/
'
,
'
https://example.com/
'
,
'file://
path
/
to
/
file
'
].
each
do
|
val
|
should
allow_value
(
val
)
.
for
:
homepage
end
end
[
nil
,
''
,
'fooo'
].
each
do
|
val
|
should_not
allow_value
(
val
)
.
for
:
homepage
end
end