Cross Reference: symbols_controller_spec.rb
xref
: /
ontohub
/
spec
/
controllers
/
symbols_controller_spec.rb
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
symbols_controller_spec.rb revision 9489ff3564e37aa76509baaab3d79ec29af9408d
require
'spec_helper'
describe
SymbolsController
do
render_views
context
'Ontology Instance'
do
let
!
(:
user
)
{
create
:
user
}
let
!
(:
logic
)
{
create
:
logic
,
user
:
user
}
let
!
(:
ontology
)
{
create
:
single_ontology
,
logic
:
logic
}
let
!
(:
repository
)
{
ontology.repository
}
context
'on GET to index'
do
before
do
get
:
index
,
repository_id
:
repository.to
_param
,
ontology_id
:
ontology.to
_param
end
it
{
should
respond_with
:
success
}
it
{
should_not
render_template
(
partial
:
'_oops_state'
)
}
end
end
context
'OWL Ontology instance'
do
let
!
(:
user
)
{
create
:
user
}
let
!
(:
logic
)
{
create
:
logic
,
name
:
'OWL'
,
user
:
user
}
let
!
(:
ontology
)
{
create
:
single_ontology
,
logic
:
logic
}
let
!
(:
repository
)
{
ontology.repository
}
context
'on GET to index'
do
before
do
get
:
index
,
repository_id
:
repository.to
_param
,
ontology_id
:
ontology.to
_param
end
it
{
should
respond_with
:
success
}
it
{
should
render_template
(
partial
:
'_oops_state'
)
}
end
end
end