Cross Reference: logic_spec.rb
xref
: /
ontohub
/
spec
/
models
/
logic_spec.rb
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
logic_spec.rb revision f0e0f09f12a9e9ce36023d339a7e35548df5bbc2
10139
N/A
require
'spec_helper'
10139
N/A
10139
N/A
describe
Logic
do
10139
N/A
context
'Logic instance'
do
10139
N/A
let
(:
user
)
{
FactoryGirl.create
:
user
}
10139
N/A
let
(:
logic
)
{
FactoryGirl.create
:
logic
,
user
:
user
}
10139
N/A
10139
N/A
it
'have to_s'
do
10139
N/A
expect
(
logic.to
_s
)
.
to
eq
(
logic.name
)
10139
N/A
end
10139
N/A
10139
N/A
it
'allow http scheme for IRI'
do
11085
N/A
expect
do
10139
N/A
logic.iri
=
'
http://example.com/logic
'
10139
N/A
logic.save
!
10139
N/A
end.not
_to
raise_error
10139
N/A
end
10646
N/A
10977
N/A
it
'allow URN scheme for IRI'
do
11066
N/A
expect
do
11085
N/A
logic.iri
=
'urn:logic:CommonLogic'
11085
N/A
logic.save
!
10139
N/A
end.not
_to
raise_error
10139
N/A
end
10139
N/A
10139
N/A
it
'not allow ftp scheme for IRI'
do
10139
N/A
expect
do
10139
N/A
logic.iri
=
'
ftp://example.com/logic
'
10139
N/A
logic.save
!
10139
N/A
end.to
raise_error
(
ActiveRecord
::
RecordInvalid
)
10139
N/A
end
10139
N/A
end
10139
N/A
end
10139
N/A