Sha256: 585a665369edefde01dce00345647ca1ee13ec3a980bf3ceb63b01cef4072f94

Contents?: true

Size: 763 Bytes

Versions: 2

Compression:

Stored size: 763 Bytes

Contents

require File.dirname(__FILE__) + '/test_helper.rb'
require 'annotations_controller'
require 'action_controller/test_process'

# Manually override the rescue_action in the controller to raise the exception back.
class AnnotationsController; def rescue_action(e) raise e end; end

class AnnotationsControllerTest < ActionController::TestCase
  def setup
    ActionController::Routing::Routes.draw do |map|
      Annotations.map_routes(map)
    end
    
    @controller = AnnotationsController.new
    @request = ActionController::TestRequest.new
    @response = ActionController::TestResponse.new
  end
  
  def test_current_user_is available
    assert_not_nil @controller.current_user
  end

  def test_index
    get :index
    assert_response :success
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
my_annotations-0.6.0 test/annotations_controller_test.rb
my_annotations-0.5.1 test/annotations_controller_test.rb