test/integration/topic_delete_test.rb
# Helper method applicable to successfull topic delete tests.
Helper method applicable to successfull topic delete tests.
Helper method applicable to successfull topic delete tests .
def delete_topic_by(user)
    log_in_as(user)
    assert_difference 'Topic.count', -1 do
      delete topic_path(@topic)
    end
    assert_redirected_to category_path(@category)
    follow_redirect!
    assert_flash_notices success: { count: 1 }
  end
def delete_topic_by ( user ) log_in_as ( user ) assert_difference 'Topic.count' , - 1 do delete topic_path ( @topic ) end assert_redirected_to category_path ( @category ) follow_redirect! assert_flash_notices success : { count : 1 } end
Helper method applicable to successfull topic delete tests.
Helper method applicable to successfull topic delete tests .
# Assert exactly one topic has been deleted.
user
<not_specific>