Skip to content

Commit

Permalink
Update email threads controller & tests (#134)
Browse files Browse the repository at this point in the history
  • Loading branch information
wassson authored Mar 15, 2024
1 parent 15cb7d9 commit 410c501
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/controllers/email_threads_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,14 @@ def inbox

def reply_later
# TODO: To be implemented later
@email_server = current_user.email_servers.first
@email_threads = @email_server.email_threads.includes(:messages)
end

def all
# TODO: To be implemented later
@email_server = current_user.email_servers.first
@email_threads = @email_server.email_threads.includes(:messages)
end

def new; end
Expand Down
11 changes: 11 additions & 0 deletions test/controllers/email_threads_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,15 @@ class EmailThreadsControllerTest < ActionDispatch::IntegrationTest
get all_email_threads_path
assert_response :ok
end

test "new" do
get new_email_thread_path
assert_response :ok
end

# TODO: Create fixtures for email_threads
# test "show" do
# get email_thread_path(email_threads(:one))
# assert_response :ok
# end
end

0 comments on commit 410c501

Please sign in to comment.