Cross Reference: prover_outputs_controller_spec.rb
xref
: /
ontohub
/
spec
/
controllers
/
api
/
v1
/
prover_outputs_controller_spec.rb
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
98
N/A
require
'spec_helper'
98
N/A
199
N/A
describe
Api
::
V1
::
ProverOutputsController
do
98
N/A
let
(:
proof_attempt
)
{
create
:
proof_attempt
, :
proven
}
606
N/A
let
(:
prover_output
)
{
proof_attempt.prover
_output
}
98
N/A
let
(:
theorem
)
{
proof_attempt.theorem
}
98
N/A
let
(:
ontology
)
{
theorem.ontology
}
98
N/A
let
(:
repository
)
{
ontology.repository
}
98
N/A
98
N/A
context
'on GET to show'
do
98
N/A
context
'requesting json representation'
,
api_specification
:
true
do
98
N/A
let
(:
prover_output_schema
)
do
98
N/A
schema_for
(
'prover_output'
)
98
N/A
end
98
N/A
98
N/A
before
do
98
N/A
get
:
show
,
98
N/A
repository_id
:
repository.to
_param
,
98
N/A
ontology_id
:
ontology.to
_param
,
98
N/A
theorem_id
:
theorem.to
_param
,
98
N/A
proof_attempt_id
:
proof_attempt.to
_param
,
98
N/A
locid
:
prover_output.locid
,
98
N/A
format
: :
json
98
N/A
end
98
N/A
98
N/A
it
{
should
respond_with
:
success
}
98
N/A
98
N/A
it
'respond with json content type'
do
98
N/A
expect
(
response.content_type.to
_s
)
.
to
eq
(
'
application
/
json
'
)
98
N/A
end
98
N/A
98
N/A
it
'should return a representation that validates against the schema'
do
606
N/A
VCR.use
_cassette
'
api
/
json-schemata
/
ontology
/
prover_output
'
do
98
N/A
expect
(
response.body
)
.
98
N/A
to
match_json_schema
(
prover_output_schema
)
98
N/A
end
493
N/A
end
98
N/A
end
98
N/A
end
606
N/A
end
98
N/A