Cross Reference:
xref
: /
ontohub
/
test
/
unit
/
oops_request
/
responses_test.rb
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
responses_test.rb revision 5cad3e82e8c017bc189c4cecc00541ec19a2a6e2
734
N/A
require
'test_helper'
734
N/A
734
N/A
class
OopsRequest
::
ResponsesTest
<
ActiveSupport
::
TestCase
734
N/A
734
N/A
context
'creating a oops request'
do
734
N/A
setup
do
734
N/A
Oops
::
Client.stubs
(:
execute_request
)
.
returns
\
734
N/A
File.read
(
"#{
Rails.root
}/
test
/
fixtures
/
oops
/
sunrealm.xml
"
)
734
N/A
734
N/A
@
version
=
FactoryGirl.create
:
ontology_version
734
N/A
@
entity
=
FactoryGirl.create
:
entity
,
734
N/A
ontology
: @
version.ontology
,
734
N/A
name
:
'Must be present'
,
734
N/A
text
:
''
,
734
N/A
iri
:
'
http://sweet.jpl.nasa.gov/1.1/sunrealm.owl
#SunRealm'
734
N/A
@
request
= @
version.create
_request
734
N/A
@
request.send
:
execute_and_save
734
N/A
734
N/A
# delete this line if you want tests running after this to fail
735
N/A
# (mocha 0.13.3)
735
N/A
Oops
::
Client.unstub
(:
execute_request
)
735
N/A
end
734
N/A
734
N/A
should
'have created a request with responses'
do
734
N/A
assert
@
request.responses.any
?
734
N/A
end
734
N/A
734
N/A
should
'affected entity with should be connected with response'
do
734
N/A
assert
@
entity.oops_responses.any
?
734
N/A
end
734
N/A
734
N/A
end
734
N/A
734
N/A
end
734
N/A