Skip to content

Commit

Permalink
Fixed tabbing and removed commented tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmckissock committed Jun 20, 2024
1 parent 010b958 commit 9e89262
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 18 deletions.
8 changes: 4 additions & 4 deletions app/views/users/articles.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
<ul>
<% user.articles.each do |article| %>
<li>
<%= link_to article.title, article.link %> - Posted on <%= article.created_at.strftime("%B %d, %Y at %I:%M %p") %>
<div>
<%= link_to "comment", article %>
</div>
<%= link_to article.title, article.link %> - Posted on <%= article.created_at.strftime("%B %d, %Y at %I:%M %p") %>
<div>
<%= link_to "Article Page", article %>
</div>
</li>
<% end %>
</ul>
Expand Down
8 changes: 4 additions & 4 deletions app/views/users/comments.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
<ul>
<% user.comments.each do |comment| %>
<li>
<%= comment.text %> posted on <%= comment.created_at.strftime("%B %d, %Y at %I:%M %p") %>
<div>
<%= link_to "Article", comment.article %>
</div>
<%= comment.text %> posted on <%= comment.created_at.strftime("%B %d, %Y at %I:%M %p") %>
<div>
<%= link_to "Article", comment.article %>
</div>
</li>
<% end %>
</ul>
Expand Down
2 changes: 1 addition & 1 deletion app/views/users/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
<p>Email: <%= user.email %></p>
<%= button_to "Change Email", edit_email_user_path(user), method: :get %>
<%= button_to "Change Password", edit_password_user_path(user), method: :get %>
<% end %>
<% end %>
5 changes: 0 additions & 5 deletions test/controllers/application_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,6 @@ class ApplicationControllerTest < ActionDispatch::IntegrationTest
assert_not @controller.logged_in?
end

# test "should redirect to login when not authorized" do
# get user_path(@user)
# assert_redirected_to login_path
# end

test "should return true for home? when on root path" do
get root_path
assert @controller.home?
Expand Down
4 changes: 0 additions & 4 deletions test/controllers/users_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,4 @@ class UsersControllerTest < ActionDispatch::IntegrationTest
assert_select "h1", @user.name
end

# test "should redirect show when not authorized" do
# get user_path(@user)
# assert_redirected_to login_path
# end
end

0 comments on commit 9e89262

Please sign in to comment.