Remove redundant tests in sitemap specs
Testing that the sitemap is valid (which we test in the following test) also checks that the sitemap has been generated. The test will also fail with different errors depending on whether no file was generated or the generated file is invalid.
This commit is contained in:
@@ -11,10 +11,6 @@ describe "rake sitemap:create", type: :system do
|
||||
describe "when processes are enabled" do
|
||||
before { Rake.application.invoke_task("sitemap:create") }
|
||||
|
||||
it "generates a sitemap" do
|
||||
expect(file).to exist
|
||||
end
|
||||
|
||||
it "generates a valid sitemap" do
|
||||
sitemap = Nokogiri::XML(File.open(file))
|
||||
expect(sitemap.errors).to be_empty
|
||||
@@ -51,10 +47,6 @@ describe "rake sitemap:create", type: :system do
|
||||
Rake.application.invoke_task("sitemap:create")
|
||||
end
|
||||
|
||||
it "generates a sitemap" do
|
||||
expect(file).to exist
|
||||
end
|
||||
|
||||
it "generates a valid sitemap" do
|
||||
sitemap = Nokogiri::XML(File.open(file))
|
||||
expect(sitemap.errors).to be_empty
|
||||
|
||||
Reference in New Issue
Block a user