Skip to content

Commit

Permalink
Display 'no active blocks' on accounts block page
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonKhorev committed Jan 20, 2025
1 parent 37f2fef commit 8d318b7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/views/accounts/blocks/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<% content_for :heading do %>
<h1><%= t ".title" %></h1>
<% end %>

<p><%= t ".no_active_blocks" %></p>
1 change: 1 addition & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ en:
blocks:
index:
title: Blocks on Me
no_active_blocks: There are no active blocks on your account.
deletions:
show:
title: Delete My Account
Expand Down
6 changes: 6 additions & 0 deletions test/controllers/accounts/blocks_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ def test_index_not_blocked

get account_blocks_path
assert_response :success
assert_dom "#content > .content-body" do
assert_dom "p", :text => /no active blocks/
end
end

def test_index_with_inactive_block
Expand All @@ -31,6 +34,9 @@ def test_index_with_inactive_block

get account_blocks_path
assert_response :success
assert_dom "#content > .content-body" do
assert_dom "p", :text => /no active blocks/
end
end

def test_index_with_unseen_block
Expand Down

0 comments on commit 8d318b7

Please sign in to comment.