Sha256: 27be01734f0eb08db1d7dca0e706383a681a3e2f030b042049549f13c0826ec1

Contents?: true

Size: 804 Bytes

Versions: 68

Compression:

Stored size: 804 Bytes

Contents

require File.dirname(__FILE__) + '/../test_helper'
require 'task_files_controller'

# Re-raise errors caught by the controller.
class TaskFilesController; def rescue_action(e) raise e end; end

class TaskFilesControllerTest < Test::Unit::TestCase
  fixtures :task_files

  def setup
    @controller = TaskFilesController.new
    @request    = ActionController::TestRequest.new
    @response   = ActionController::TestResponse.new
    @request.session[:user_id] = 1000001
  end

  def test_should_show_task_file
    get :show, :id => 1
    assert_response :success
  end

  def test_should_destroy_task_file
    old_count = TaskFile.count
    delete :destroy, :id => 1
    assert_equal old_count-1, TaskFile.count
    
    assert_redirected_to :controller => 'tasks', :action => :edit, :id => 2
  end
end

Version data entries

68 entries across 68 versions & 1 rubygems

Version Path
backlog-0.10.0 test/functional/task_files_controller_test.rb
backlog-0.10.1 test/functional/task_files_controller_test.rb
backlog-0.10.5 test/functional/task_files_controller_test.rb
backlog-0.10.2 test/functional/task_files_controller_test.rb
backlog-0.10.4 test/functional/task_files_controller_test.rb
backlog-0.10.3 test/functional/task_files_controller_test.rb
backlog-0.10.7 test/functional/task_files_controller_test.rb
backlog-0.10.6 test/functional/task_files_controller_test.rb
backlog-0.11.0 test/functional/task_files_controller_test.rb
backlog-0.12.0 test/functional/task_files_controller_test.rb
backlog-0.10.8 test/functional/task_files_controller_test.rb
backlog-0.12.1 test/functional/task_files_controller_test.rb
backlog-0.12.2 test/functional/task_files_controller_test.rb
backlog-0.12.4 test/functional/task_files_controller_test.rb
backlog-0.12.3 test/functional/task_files_controller_test.rb
backlog-0.13.1 test/functional/task_files_controller_test.rb
backlog-0.13.0 test/functional/task_files_controller_test.rb
backlog-0.14.0 test/functional/task_files_controller_test.rb
backlog-0.14.3 test/functional/task_files_controller_test.rb
backlog-0.14.2 test/functional/task_files_controller_test.rb