diff --git a/app/views/articles/show.html.erb b/app/views/articles/show.html.erb index 6d3883835..095527975 100644 --- a/app/views/articles/show.html.erb +++ b/app/views/articles/show.html.erb @@ -69,7 +69,7 @@
<%= t("views.articles.unpublished.subtitle") %><%= t("views.articles.unpublished.text") %> <% if user_signed_in? %> - <%= t("views.articles.unpublished.edit") %> + <% end %>
<% end %> diff --git a/spec/system/articles/user_visits_an_article_spec.rb b/spec/system/articles/user_visits_an_article_spec.rb index 1176fad09..a0c76fcf6 100644 --- a/spec/system/articles/user_visits_an_article_spec.rb +++ b/spec/system/articles/user_visits_an_article_spec.rb @@ -158,9 +158,9 @@ RSpec.describe "Views an article", type: :system do let(:query_params) { "?preview=#{article.password}" } let(:article_user) { create(:user) } - it "does not the article edit link" do + it "renders the article edit link" do visit article_path - expect(page.body).not_to include('display: inline-block;">Click to edit') + expect(page.body).to include('display: none;">Click to edit') end end @@ -168,10 +168,10 @@ RSpec.describe "Views an article", type: :system do let(:query_params) { "?preview=#{article.password}" } let(:article_user) { user } - it "does not the article edit link" do + it "does not render the article edit link" do sign_out user visit article_path - expect(page.body).not_to include('display: inline-block;">Click to edit') + expect(page.body).not_to include("Click to edit") end end