Merge pull request #817 from microweb10/friendly_urls

Friendly urls
This commit is contained in:
Raimond Garcia
2016-03-02 17:51:00 +01:00
10 changed files with 107 additions and 0 deletions

View File

@@ -65,6 +65,28 @@ feature 'Proposals' do
end
end
context "Show" do
scenario 'When path matches the friendly url' do
proposal = create(:proposal)
right_path = proposal_path(proposal)
visit right_path
expect(current_path).to eq(right_path)
end
scenario 'When path does not match the friendly url' do
proposal = create(:proposal)
right_path = proposal_path(proposal)
old_path = "#{proposals_path}/#{proposal.id}-something-else"
visit old_path
expect(current_path).to_not eq(old_path)
expect(current_path).to eq(right_path)
end
end
scenario 'Social Media Cards' do
proposal = create(:proposal)