- <%= article.cached_user.name %>
+ <%= article.cached_user.name %>
・ <%= article.readable_publish_date %>
- <% if article.nth_published_by_author < 4 %>
+ <% if article.nth_published_by_author > 0 && article.nth_published_by_author < 4 %>
・ 👋 <%= article.nth_published_by_author.ordinalize %> post by this user
<% end %>
diff --git a/spec/requests/moderations_spec.rb b/spec/requests/moderations_spec.rb
index 5b358eefd..a64852591 100644
--- a/spec/requests/moderations_spec.rb
+++ b/spec/requests/moderations_spec.rb
@@ -63,16 +63,10 @@ RSpec.describe "Moderations", type: :request do
expect(response.body).to include("We build the")
end
- it "grants access to /mod index with articles" do
- create(:article, published: true)
- get "/mod"
- expect(response.body).to include("We build the")
- end
-
- it "grants access to /mod index with articles" do
+ it "grants access to /mod/:tag index with articles" do
create(:article, published: true)
get "/mod/#{article.tags.first}"
- expect(response.body).to include("#"+article.tags.first.name.titleize)
+ expect(response.body).to include("#" + article.tags.first.name.titleize)
end
end
end