1) PapersController PUT #transition AS EDITOR responds successfully with a correct status and accept paper
Failure/Error: put :transition, identifier:paper.typed_provider_id, transition: :accept
AASM::InvalidTransition:
Event 'resolve' cannot transition from 'unresolved'
# ./app/models/paper.rb:151:in `resolve_all_issues'
# ./app/controllers/papers_controller.rb:93:in `transition'
# ./spec/support/controller_spec_helpers.rb:36:in `process_with_default_params'
# ./spec/controllers/papers_controller_spec.rb:382:in `block (3 levels) in <top (required)>'
As the resolve call on Annotation is guarded with can_change_state which checks to see if the paper is under_review? before changing the state of the annotation. This fails as the paper isn't in the under_review state, it's review_completed.
Demonstration of #239 bug in the tests.
This test is failing as follows:
because
resolve_all_issues
onPaper
callsresolve
on eachAnnotation
.As the
resolve
call onAnnotation
is guarded withcan_change_state
which checks to see if the paper isunder_review?
before changing the state of the annotation. This fails as the paper isn't in theunder_review
state, it'sreview_completed
.