Cross Reference: symbols_controller_spec.rb
xref
: /
ontohub
/
spec
/
controllers
/
api
/
v1
/
symbols_controller_spec.rb
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
symbols_controller_spec.rb revision a4858107b988a87fefb437b85367b7d204da7e23
1516
N/A
require
'spec_helper'
39
N/A
39
N/A
describe
Api
::
V1
::
SymbolsController
do
39
N/A
context
'on GET to show'
do
39
N/A
let
(:
symbol
)
{
create
:
symbol
}
39
N/A
let
(:
ontology
)
{
symbol.ontology
}
39
N/A
let
(:
repository
)
{
ontology.repository
}
39
N/A
39
N/A
context
'requesting json representation'
,
api_specification
:
true
do
39
N/A
let
(:
symbol_schema
)
{
schema_for
(
'symbol'
)
}
39
N/A
39
N/A
before
do
39
N/A
get
:
show
,
39
N/A
repository_id
:
repository.to
_param
,
39
N/A
ontology_id
:
ontology.to
_param
,
39
N/A
id
:
symbol.to
_param
,
39
N/A
locid
:
symbol.locid
,
39
N/A
format
: :
json
39
N/A
end
39
N/A
39
N/A
it
{
should
respond_with
:
success
}
926
N/A
926
N/A
it
'respond with json content type'
do
1890
N/A
expect
(
response.content_type.to
_s
)
.
to
eq
(
'
application
/
json
'
)
926
N/A
end
39
N/A
1713
N/A
it
'should return a representation that validates against the schema'
do
2026
N/A
VCR.use
_cassette
'
api
/
json-schemata
/
symbol
'
do
342
N/A
expect
(
response.body
)
.
to
match_json_schema
(
symbol_schema
)
1516
N/A
end
1636
N/A
end
1386
N/A
end
838
N/A
end
39
N/A
end
51
N/A