spec/ballast/concerns/ajax_spec.rb in ballast-1.9.2 vs spec/ballast/concerns/ajax_spec.rb in ballast-1.9.3
- old
+ new
@@ -125,12 +125,17 @@
"Access-Control-Allow-Credentials" => "true"
})
end
end
- describe "#disallow_robots" do
- it "should disallow robots outputting a text view" do
+ describe "#generate_robots_txt" do
+ it "should generate a robots.txt file which prevents everything by default" do
expect(subject).to receive(:render).with(text: "User-agent: *\nDisallow: /", content_type: "text/plain")
subject.disallow_robots
+ end
+
+ it "should generate a robots.txt file which prevents everything by default" do
+ expect(subject).to receive(:render).with(text: "User-agent: A\nDisallow: B\nDisallow: C\nDisallow: D\n\nUser-agent: E\nDisallow: F\nDisallow: \nDisallow: G", content_type: "text/plain")
+ subject.generate_robots_txt([["A", "B", "C", "D"], ["E", "F", "", "G"]])
end
end
end
\ No newline at end of file