-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add redirect for assembleaclima (#445)
- Loading branch information
1 parent
08ca939
commit 7b4c4c1
Showing
3 changed files
with
44 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# frozen_string_literal: true | ||
|
||
require "rails_helper" | ||
|
||
describe "Redirect Middleware", type: :system do | ||
let!(:organization) { process.organization } | ||
let!(:process) { create(:participatory_process, slug: slug, title: { ca: title_ca }) } | ||
|
||
before do | ||
switch_to_host(organization.host) | ||
end | ||
|
||
describe "Futur Europa redirect" do | ||
let(:title_ca) { "El futur d'Europa" } | ||
let(:slug) { "FuturEuropa" } | ||
|
||
it "redirects to the process when /futur-europa is visited" do | ||
visit "/futur-europa" | ||
expect(page).to have_content(title_ca) | ||
end | ||
end | ||
|
||
describe "Pla director cooperació" do | ||
let(:title_ca) { "Pla director cooperació" } | ||
let(:slug) { "pladirectorcooperacio" } | ||
|
||
it "redirects to the process when /participacooperacio is visited" do | ||
visit "/participacooperacio" | ||
expect(page).to have_content(title_ca) | ||
end | ||
end | ||
|
||
describe "Assemblea clima" do | ||
let(:title_ca) { "Assemblea clima" } | ||
let(:slug) { "assembleaclima" } | ||
|
||
it "redirects to the process when /assembleaclima is visited" do | ||
visit "/assembleaclima" | ||
expect(page).to have_content(title_ca) | ||
end | ||
end | ||
end |