Skip to content

Commit

Permalink
Merge pull request #6582 from samvera/updates_index_html_erb_spec
Browse files Browse the repository at this point in the history
Makes application_name dynamically tested in `spec/views/hyrax/users/index.html.erb_spec.rb`.
  • Loading branch information
dlpierce authored Jan 5, 2024
2 parents 7aa48ed + 11fb84f commit 043a6a9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion spec/views/hyrax/users/index.html.erb_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# frozen_string_literal: true
RSpec.describe 'hyrax/users/index.html.erb', type: :view do
let(:join_date) { 5.days.ago }
let(:application_name) { I18n.t('hyrax.product_name', default: 'Hyrax') }

before do
users = []
Expand All @@ -17,7 +18,7 @@
it "draws user list" do
render
page = Capybara::Node::Simple.new(rendered)
expect(page).to have_content("Hyrax Users")
expect(page).to have_content("#{application_name} Users")
expect(page).to have_content("Works Created")
(1..10).each do |i|
expect(page).to have_content("user#{i}")
Expand Down

0 comments on commit 043a6a9

Please sign in to comment.