Skip to content

Commit cc84a7e

Browse files
committed
Fix tests
1 parent 7c551ef commit cc84a7e

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

test/functional/pages_controller_test.rb

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,4 @@ class PagesControllerTest < ActionController::TestCase
2626
assert_equal("no-cache", response.headers["Pragma"])
2727
assert_equal("Fri, 01 Jan 1990 00:00:00 GMT", response.headers["Expires"])
2828
end
29-
30-
test "redirect invalid topic" do
31-
get :topic, params: { topic: 'test' }
32-
assert_redirected_to root_url
33-
end
3429
end
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# frozen_string_literal: true
2+
3+
require 'test_helper'
4+
5+
class TopicsControllerTest < ActionController::TestCase
6+
include Devise::Test::ControllerHelpers
7+
8+
test "redirect invalid topic" do
9+
get :show, params: { id: 'test' }
10+
assert_redirected_to root_url
11+
end
12+
end

0 commit comments

Comments
 (0)