summaryrefslogtreecommitdiff
path: root/test/controllers/forums_controller_test.rb
blob: 3383f614b63cd455010a9db104cc93c33d896d18 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# frozen_string_literal: true

require 'test_helper'

class ForumsControllerTest < ActionController::TestCase
  setup do
    @forum = create(:forum)
  end

  test 'should get index' do
    get :index
    assert_response :success
    assert assigns(:forums)
  end

  test 'should get show' do
    get :show, params: { id: @forum.short_name }
    assert_response :success
    assert_equal @forum, assigns(:forum)
  end
end