Skip to content

Commit

Permalink
Fix profile view test
Browse files Browse the repository at this point in the history
  • Loading branch information
Janell-Huyck committed Nov 15, 2024
1 parent 2d21dc4 commit 6fd20d5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion app/views/users/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ sure?' } %></td>
</tbody>
</table>
<% else %>
<p style="font-weight: bold; margin: 0; color: red; text-align: center;">You don't have sufficient privileges to view this content !<br/>Please contact the administrator for more
<p style="font-weight: bold; margin: 0; color: red; text-align: center;">You don't have sufficient privileges to view this content!<br/>Please contact the administrator for more
details.
</p>
<% end %>
Expand Down
30 changes: 15 additions & 15 deletions spec/views/front/profile.html.erb_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ def sign_in_user(admin)

it 'displays an profile page' do
render
expect(rendered).to have_text('Profile')
expect(rendered).to have_text(' Email')
expect(rendered).to have_text('[email protected]')
expect(rendered).to include('Profile')
expect(rendered).to include(' Email')
expect(rendered).to include('[email protected]')
end

it 'displays an user management tab' do
render
expect(rendered).to have_text('User Management')
expect(rendered).to have_text('Admin Test')
expect(rendered).to include('User Management')
expect(rendered).to include('Admin Test')
end
end

Expand All @@ -60,15 +60,15 @@ def sign_in_user(admin)

it 'displays an profile page' do
render
expect(rendered).to have_text('Profile')
expect(rendered).to have_text(' Email')
expect(rendered).to have_text('[email protected]')
expect(rendered).to include('Profile')
expect(rendered).to include(' Email')
expect(rendered).to include('[email protected]')
end

it 'displays an user management tab' do
render
expect(rendered).to have_text('User Management')
expect(rendered).to have_text("You don't have sufficient privileges to view this content !")
expect(rendered).to include('User Management')
expect(rendered.squish).to include("You don't have sufficient privileges to view this content!")
end
end

Expand All @@ -95,14 +95,14 @@ def sign_in_user(admin)

it 'displays an profile page' do
render
expect(rendered).to have_text('Profile')
expect(rendered).to have_text(' Email')
expect(rendered).to have_text('[email protected]')
expect(rendered).to include('Profile')
expect(rendered).to include(' Email')
expect(rendered).to include('[email protected]')
end

it 'displays an user management tab' do
render
expect(rendered).to have_text('User Management')
expect(rendered).to have_text("You don't have sufficient privileges to view this content !")
expect(rendered).to include('User Management')
expect(rendered.squish).to include("You don't have sufficient privileges to view this content!")
end
end

0 comments on commit 6fd20d5

Please sign in to comment.