mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-13 08:34:49 +08:00
Fix failing tests for item relationships [SCI-9719] (#6900)
This commit is contained in:
parent
e2233523d2
commit
4649a17cf9
2 changed files with 5 additions and 5 deletions
|
@ -7,14 +7,14 @@ module Api
|
||||||
steps = timestamps_filter(@protocol.steps).page(params.dig(:page, :number))
|
steps = timestamps_filter(@protocol.steps).page(params.dig(:page, :number))
|
||||||
.per(params.dig(:page, :size))
|
.per(params.dig(:page, :size))
|
||||||
|
|
||||||
render jsonapi: steps, each_serializer: StepSerializer,
|
render jsonapi: steps, each_serializer: Api::V2::StepSerializer,
|
||||||
include: include_params,
|
include: include_params,
|
||||||
rte_rendering: render_rte?,
|
rte_rendering: render_rte?,
|
||||||
team: @team
|
team: @team
|
||||||
end
|
end
|
||||||
|
|
||||||
def show
|
def show
|
||||||
render jsonapi: @step, serializer: StepSerializer,
|
render jsonapi: @step, serializer: Api::V2::StepSerializer,
|
||||||
include: include_params,
|
include: include_params,
|
||||||
rte_rendering: render_rte?,
|
rte_rendering: render_rte?,
|
||||||
team: @team
|
team: @team
|
||||||
|
@ -31,7 +31,7 @@ module Api
|
||||||
last_modified_by_id: current_user.id)
|
last_modified_by_id: current_user.id)
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
render jsonapi: @step, serializer: StepSerializer, status: :created
|
render jsonapi: @step, serializer: Api::V2::StepSerializer, status: :created
|
||||||
end
|
end
|
||||||
|
|
||||||
def update
|
def update
|
||||||
|
@ -48,7 +48,7 @@ module Api
|
||||||
num_completed: completed_steps.to_s,
|
num_completed: completed_steps.to_s,
|
||||||
num_all: all_steps.to_s)
|
num_all: all_steps.to_s)
|
||||||
end
|
end
|
||||||
render jsonapi: @step, serializer: StepSerializer, status: :ok
|
render jsonapi: @step, serializer: Api::V2::StepSerializer, status: :ok
|
||||||
else
|
else
|
||||||
render body: nil, status: :no_content
|
render body: nil, status: :no_content
|
||||||
end
|
end
|
||||||
|
|
|
@ -205,7 +205,7 @@ RSpec.describe 'Api::V2::StepsController', type: :request do
|
||||||
expect(response).to have_http_status 200
|
expect(response).to have_http_status 200
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'returns well formated response' do
|
it 'returns well formatted response' do
|
||||||
action
|
action
|
||||||
|
|
||||||
expect(json).to match(
|
expect(json).to match(
|
||||||
|
|
Loading…
Add table
Reference in a new issue