Sha256: 237cbb645e9ca0ce01ccd109fd689a53f0ec7344bfa0f72df0ba4d0146fde7fc

Contents?: true

Size: 677 Bytes

Versions: 1

Compression:

Stored size: 677 Bytes

Contents

require 'test_helper'

class SiringaControllerTest < ActionController::TestCase

  tests Siringa::SiringaController

  def setup
  end

  def teardown
  end

  test "load action passing existing factory" do
    get :load, { definition: "initial", use_route: "siringa" }
    assert_response :success
  end

  test "load action passing a factory that doesn't exist" do
    get :load, { definition: "papapa", use_route: "siringa" }
    assert_response :method_not_allowed
  end

  test "load action passing arguments" do
    get :load, { definition: "definition_with_arguments", siringa_args: { name: 'Robb Stark' }, use_route: "siringa" }
    assert_response :success
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
siringa-0.0.6 test/controllers/siringa_controller_test.rb