Cross Reference:
xref
: /
ontohub
/
test
/
functional
/
users_controller_test.rb
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
users_controller_test.rb revision 670bf306e8cf030775bccde8876f46da47ebdc9c
2d0611ffc9f91c5fc2ddccb93f9a3d17791ae650
takashi
require
'test_helper'
2d0611ffc9f91c5fc2ddccb93f9a3d17791ae650
takashi
dc0d8d65d35787d30a275895ccad8d8e1b58a5ed
nd
class
UsersControllerTest
<
ActionController
::
TestCase
dc0d8d65d35787d30a275895ccad8d8e1b58a5ed
nd
dc0d8d65d35787d30a275895ccad8d8e1b58a5ed
nd
should
route
(:
get
,
"/
users
/
id
"
)
.
to
(:
controller
=> :
users
, :
action
=> :
show
, :
id
=>
'id'
)
cf2d22edbf77991ac7736f56b324b978093db17e
nd
f072359f493a5209335799da85ac16d6a273303b
gryzor
context
'User Instance'
do
f072359f493a5209335799da85ac16d6a273303b
gryzor
setup
do
f072359f493a5209335799da85ac16d6a273303b
gryzor
@
user
=
Factory
:
user
f072359f493a5209335799da85ac16d6a273303b
gryzor
end
6ae232055d4d8a97267517c5e50074c2c819941a
nd
cf2d22edbf77991ac7736f56b324b978093db17e
nd
context
'without data'
do
6ae232055d4d8a97267517c5e50074c2c819941a
nd
context
'on GET to show'
do
setup
do
get
:
show
, :
id
=> @
user.to
_param
end
should
assign_to
:
versions
should
assign_to
:
comments
should
respond_with
:
success
should
render_template
:
show
end
end
context
'with data'
do
setup
do
OntologyVersion.any_instance.expects
(:
parse_async
)
.
once
Factory
:
comment
, :
user
=> @
user
Factory
:
ontology_version
, :
user
=> @
user
end
context
'on GET to show'
do
setup
do
get
:
show
, :
id
=> @
user.to
_param
end
should
assign_to
:
versions
should
assign_to
:
comments
should
respond_with
:
success
should
render_template
:
show
end
end
end
end