Skip to content

Commit ea7552c

Browse files
committed
Add data-integrity assertion to distribution update cross-org test
Verify the distribution record is unchanged after a rejected cross-org update attempt, matching the pattern used in the broadcast announcements spec.
1 parent 91fecf4 commit ea7552c

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

spec/requests/distributions_requests_spec.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -689,8 +689,10 @@
689689
context "when accessing a distribution from another organization" do
690690
it "returns 404" do
691691
other_distribution = create(:distribution, organization: create(:organization))
692+
original_comment = other_distribution.comment
692693
patch distribution_path(id: other_distribution.id), params: {distribution: {comment: "hacked"}}
693694
expect(response.status).to eq(404)
695+
expect(other_distribution.reload.comment).to eq(original_comment)
694696
end
695697
end
696698

0 commit comments

Comments
 (0)