Skip to content
Browse files

remove unneeded topics#show action and tests

  • Loading branch information...
1 parent af96f0c commit f0b8b6d4b343d5df301d9052c003b742e8898ac1 @bscofield committed
View
16 generators/bagpipes/templates/test/functional/topics_controller_test.rb
@@ -12,22 +12,6 @@ def setup
assert_template 'index'
end
- test "show should render" do
- t = Topic.create(:title => 'Test Topic')
- get :show, :id => t.id
- assert_template 'show'
- end
-
- test "show unknown should redirect" do
- get :show, :id => 1
- assert_redirected_to topics_path
- end
-
- test "show unknown should set flash" do
- get :show, :id => 1
- assert flash[:error]
- end
-
test "new should render" do
get :new
assert_template 'new'
View
7 lib/bagpipes/controllers/topics_controller.rb
@@ -14,13 +14,6 @@ def index
@topics = Topic.by_title.all
end
- def show
- @topic = Topic.find(params[:id])
- rescue ActiveRecord::RecordNotFound
- flash[:error] = "That topic no longer exists"
- redirect_to topics_path
- end
-
def new
@topic = Topic.new
end

0 comments on commit f0b8b6d

Please sign in to comment.
Something went wrong with that request. Please try again.