You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
context 'with a sideloading request' do
let(:user) { create(:user, :with_school, tag_count: 1}
before(:each) do
get profile_url(params: { include: [:school, :tags].join(',') })
end
it 'renders the sideloaded entities in the JSON' do
expect(json_included_types).to include('school', 'tag')
aggregate_failures('sideloaded entities') do
assert_payload(:'public/school', user.school, json_include('school'))
assert_payload(:'public/tag', user.tags.first, json_include('tag'))
end
end
end
end
The output provided on the nested aggregate_failure > assert_payload is quite enigmatic
Got 2 failures and 1 other error from failure aggregation block "sideloaded entities".
[Backtrace]
1.1) Got 2 failures from failure aggregation block "payload has correct key/values".
[Backtrace]
1.1.1) Failure/Error: assign_backtrace(failure) unless failure.backtrace
Expected JSON payload to have key 'created_at' but was not present
[Backtrace]
1.1.2) Failure/Error: assign_backtrace(failure) unless failure.backtrace
Expected JSON payload to have key 'updated_at' but was not present
[Backtrace]
Given the following test
The output provided on the nested
aggregate_failure > assert_payload
is quite enigmaticThe weird part here is
Whereas the usual error message should repeat the error line like
Failure/Error: assert_payload(:'public/school', user.school, json_include('school'))
The text was updated successfully, but these errors were encountered: