Sha256: 45fb0cfd4210a1e53a3dff113da7e57389bac838e6d1a51f51c9285e2403bad9

Contents?: true

Size: 931 Bytes

Versions: 9

Compression:

Stored size: 931 Bytes

Contents

require File.dirname(__FILE__) + '/../../test_helper'
require 'admin/textfilters_controller'

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

class Admin::TextfiltersControllerTest < Test::Unit::TestCase
  fixtures :text_filters, :users

  def setup
    @controller = Admin::TextfiltersController.new
    @request    = ActionController::TestRequest.new
    @response   = ActionController::TestResponse.new

    @request.session = { :user => users(:tobi) }
  end

  def test_new_without_filters
    post :new, :textfilter => { :name => 'filterx',
      :description => 'Filter X', :markup => 'markdown' }
    assert_redirected_to :action => 'show'
  end

  def test_edit_without_filters
    post :edit, :id => 1, :textfilter => { :name => 'filterx',
      :description => 'Filter X', :markup => 'markdown' }
    assert_redirected_to :action => 'show'
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
typo-3.99.0 test/functional/admin/textfilters_controller_test.rb
typo-3.99.1 test/functional/admin/textfilters_controller_test.rb
typo-3.99.3 test/functional/admin/textfilters_controller_test.rb
typo-3.99.2 test/functional/admin/textfilters_controller_test.rb
typo-4.0.2 test/functional/admin/textfilters_controller_test.rb
typo-4.0.1 test/functional/admin/textfilters_controller_test.rb
typo-3.99.4 test/functional/admin/textfilters_controller_test.rb
typo-4.0.0 test/functional/admin/textfilters_controller_test.rb
typo-4.0.3 test/functional/admin/textfilters_controller_test.rb