Skip to content

test: cover create/update with relationship includes#92

Open
Fivell wants to merge 1 commit into
masterfrom
test/cover-pending-include-specs
Open

test: cover create/update with relationship includes#92
Fivell wants to merge 1 commit into
masterfrom
test/cover-pending-include-specs

Conversation

@Fivell

@Fivell Fivell commented Jun 14, 2026

Copy link
Copy Markdown
Member

Implements the four long-standing xit placeholders (dating back to 2017–2018) that described "create/update + assign relationship + include in response" but were never written:

  • VoiceInTrunkGroup POST + assign voice_in_trunks + include
  • SharedCapacityGroup POST + assign dids + include
  • VoiceInTrunk POST + assign pop + include
  • VoiceInTrunk PATCH + assign pop + include

Approach

  • Uses record.request_includes(:rel) to emit ?include= on POST/PATCH, then asserts the included resources deserialize straight into the associations (no second HTTP request — WebMock would fail otherwise).
  • Fixtures captured from the live sandbox via GET …?include= (authentic JSON:API shape, identical to what POST/PATCH-with-include returns). The one real DID number was normalized to a documentation placeholder; no credentials/IPs/internal hosts present.

Result

Suite: 532 examples, 0 failures, 0 pending (was 4 pending). Rubocop clean.

Implement the four long-standing xit placeholders (2017-2018) that
described create/update + assign-relationship + include-in-response but
were never written:
- VoiceInTrunkGroup POST + assign voice_in_trunks + include
- SharedCapacityGroup POST + assign dids + include
- VoiceInTrunk POST + assign pop + include
- VoiceInTrunk PATCH + assign pop + include

Uses request_includes to emit ?include= on writes and asserts the
included resources deserialize into the associations without a second
request. Fixtures captured from the live sandbox (GET ?include=),
DID number normalized to a documentation placeholder.

Suite: 532 examples, 0 failures, 0 pending (was 4 pending).
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
65.5% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant