tests: fix tests.

This commit is contained in:
evazion
2020-07-13 19:30:40 -05:00
parent 7f2eaeb02b
commit afef9cc9ab
2 changed files with 2 additions and 1 deletions

View File

@@ -4,7 +4,7 @@
<% 0.upto(@relation.maximum(:id) / @limit) do |page| %>
<% lo = page * @limit %>
<% hi = (page + 1) * @limit %>
<% lastmod = @relation.where(id: lo..hi).maximum(:updated_at).iso8601 %>
<% lastmod = @relation.where(id: lo..hi).maximum(:updated_at)&.iso8601 %>
<% if @sitemap == "posts" %>
<% loc = posts_url(limit: @limit, format: :sitemap, tags: "id:#{lo}..#{hi}") %>
<% else %>

View File

@@ -129,6 +129,7 @@ module PostSets
context "that has a matching artist" do
setup do
Tag.find_by(name: "a").update!(category: Tag.categories.artist)
@artist = FactoryBot.create(:artist, :name => "a")
end