remove scripts before calculating hashes

This commit is contained in:
Christian Mehlmauer
2016-10-25 20:44:00 +02:00
parent b08e298eba
commit 3c74ee8d97
2 changed files with 17 additions and 3 deletions

View File

@@ -176,6 +176,17 @@ describe 'WebSite' do
@expected = "yolo\n\n\nworld!"
end
end
context 'when there are scripts' do
let(:page) {
body = "yolo\n\n<script type=\"text/javascript\">alert('Hi');</script>\nworld!"
Typhoeus::Response.new(body: body)
}
it 'removes them' do
@expected = "yolo\n\n\nworld!"
end
end
end
describe '#homepage_hash' do