Make polymorphic_path work with poll shifts

This commit is contained in:
Javi Martín
2020-06-09 00:14:27 +02:00
parent 94a1865217
commit 289eb96561
3 changed files with 12 additions and 1 deletions

View File

@@ -157,6 +157,13 @@ describe "Polymorphic routes" do
)
end
it "routes poll shifts" do
booth = create(:poll_booth)
shift = create(:poll_shift, booth: booth)
expect(admin_polymorphic_path(shift)).to eq(admin_booth_shift_path(booth, shift))
end
it "supports routes for actions like edit" do
proposal = create(:proposal)
milestone = create(:milestone, milestoneable: proposal)