diff options
author | Francis Irving <francis@mysociety.org> | 2010-03-09 18:13:47 +0000 |
---|---|---|
committer | Francis Irving <francis@mysociety.org> | 2010-03-09 18:13:47 +0000 |
commit | 32ebcc8ebd82c33a29196e5456ea5e84a0ced59c (patch) | |
tree | 32d81488f7f0f90b34e96a74a9356fad91585bb1 /spec/views | |
parent | 5308b4a1b8a206142177717dd08426846aadceea (diff) |
Fix URLs to Scottish charity regulator
Diffstat (limited to 'spec/views')
-rw-r--r-- | spec/views/public_body/show.rhtml_spec.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/views/public_body/show.rhtml_spec.rb b/spec/views/public_body/show.rhtml_spec.rb index fbd05b9d1..7464320ed 100644 --- a/spec/views/public_body/show.rhtml_spec.rb +++ b/spec/views/public_body/show.rhtml_spec.rb @@ -70,6 +70,15 @@ describe "when viewing a body" do end end + it "should link to Scottish Charity Regulator site if we have an SC number" do + @pb.stub!(:charity_number).and_return('SC1234') + render "public_body/show" + response.should have_tag("div#request_sidebar") do + with_tag("a[href*=?]", /www.oscr.org.uk.*id=SC1234$/) + end + end + + it "should not link to Charity Commission site if we don't have number" do render "public_body/show" response.should have_tag("div#request_sidebar") do |