diff options
author | Robin Houston <robin.houston@gmail.com> | 2012-01-11 17:16:13 +0000 |
---|---|---|
committer | Robin Houston <robin.houston@gmail.com> | 2012-01-11 17:16:13 +0000 |
commit | 883a720e0efbf44e198dffd8efcf65f8d219b08e (patch) | |
tree | ac18d2ab593fa91dfa1708fa290bb1a2662bdc8e /spec/helpers/link_to_helper_spec.rb | |
parent | d734493ce3bcade2c6a819fc98f9b60c860c3fa7 (diff) | |
parent | f098a984efacc9cb486991e9ea2da206cf853c6e (diff) |
Merge branch 'release/0.5' into develop
Diffstat (limited to 'spec/helpers/link_to_helper_spec.rb')
-rw-r--r-- | spec/helpers/link_to_helper_spec.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/helpers/link_to_helper_spec.rb b/spec/helpers/link_to_helper_spec.rb index aae00c298..f85d2e70d 100644 --- a/spec/helpers/link_to_helper_spec.rb +++ b/spec/helpers/link_to_helper_spec.rb @@ -20,5 +20,17 @@ describe LinkToHelper do end end + + describe "when appending something to a URL" do + it 'should append to things without query strings' do + main_url('/a', '.json').should == 'http://test.localdomain/a.json' + end + it 'should append to things with query strings' do + main_url('/a?z=1', '.json').should == 'http://test.localdomain/a.json?z=1' + end + it 'should fail silently with invalid URLs' do + main_url('/a?z=9%', '.json').should == 'http://test.localdomain/a?z=9%' + end + end end |