2017-05-23 16:20:53 -04:00
|
|
|
shared_examples "an autodiscoverable RSS feed with current_user's RSS token" do
|
|
|
|
it "has an RSS autodiscovery link tag with current_user's RSS token" do
|
2017-06-21 19:44:10 -04:00
|
|
|
expect(page).to have_css("link[type*='atom+xml'][href*='rss_token=#{user.rss_token}']", visible: false)
|
2017-02-28 15:50:57 -05:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-05-23 16:20:53 -04:00
|
|
|
shared_examples "it has an RSS button with current_user's RSS token" do
|
|
|
|
it "shows the RSS button with current_user's RSS token" do
|
2017-06-21 19:44:10 -04:00
|
|
|
expect(page).to have_css("a:has(.fa-rss)[href*='rss_token=#{user.rss_token}']")
|
2017-02-28 15:50:57 -05:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-05-23 16:20:53 -04:00
|
|
|
shared_examples "an autodiscoverable RSS feed without an RSS token" do
|
|
|
|
it "has an RSS autodiscovery link tag without an RSS token" do
|
2017-05-23 09:59:33 -04:00
|
|
|
expect(page).to have_css("link[type*='atom+xml']:not([href*='rss_token'])", visible: false)
|
2017-02-28 15:50:57 -05:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-05-23 16:20:53 -04:00
|
|
|
shared_examples "it has an RSS button without an RSS token" do
|
|
|
|
it "shows the RSS button without an RSS token" do
|
2017-05-23 09:59:33 -04:00
|
|
|
expect(page).to have_css("a:has(.fa-rss):not([href*='rss_token'])")
|
2017-02-28 15:50:57 -05:00
|
|
|
end
|
|
|
|
end
|