Sha256: 90e4b1727df41062831e099b90507f46ffbc40776500d35a4b89e068cd1e3830
Contents?: true
Size: 708 Bytes
Versions: 67
Compression:
Stored size: 708 Bytes
Contents
require 'spec_helper' describe "A visitor viewing a resource not in our domain" do before do @foreign_resource = FactoryGirl.build(:foreign_resource) @url = "http://pmdtest.dev/resource?uri=#{CGI.escape(@foreign_resource.uri.to_s)}" end context 'where we have data about it' do before do @foreign_resource.save! end it "should show a page about that resource" do visit @url page.current_url.should eq(@url) page.should have_content @foreign_resource.uri.to_s end end context "where we don't have data about it" do it "should redirect away" do visit @url page.current_url.should eq(@foreign_resource.uri.to_s) end end end
Version data entries
67 entries across 67 versions & 1 rubygems