summaryrefslogtreecommitdiff
path: root/test/controllers/posts/posteds_controller_test.rb
blob: 61c8ca473a2f9de116c03f549fbfb1e6cafa00ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# frozen_string_literal: true

require 'test_helper'

class Posts::PostedsControllerTest < ActionController::TestCase
  setup do
    @topic = create(:topic_with_posts)
    @forum = @topic.forum
    @request.cookies['_ses'] = 'c1836832948'
  end

  test 'should get posted' do
    @post = @topic.posts.last
    @user = @post.user

    get :show, params: { user_id: @user.id }
    assert_response :success
  end
end