Sha256: e9dc4d65b1497a99b2950e93cf5e1acb5863b7c8a639983bfa94ec4fb9c33af0

Contents?: true

Size: 910 Bytes

Versions: 3

Compression:

Stored size: 910 Bytes

Contents

require 'test_helper'

class FoosControllerTest < ActionDispatch::IntegrationTest
  setup do
    @foo = foos(:one)
  end

  test "should get index" do
    get foos_url
    assert_response :success
  end

  test "should get new" do
    get new_foo_url
    assert_response :success
  end

  test "should create foo" do
    assert_difference('Foo.count') do
      post foos_url, params: { foo: {  } }
    end

    assert_redirected_to foo_url(Foo.last)
  end

  test "should show foo" do
    get foo_url(@foo)
    assert_response :success
  end

  test "should get edit" do
    get edit_foo_url(@foo)
    assert_response :success
  end

  test "should update foo" do
    patch foo_url(@foo), params: { foo: {  } }
    assert_redirected_to foo_url(@foo)
  end

  test "should destroy foo" do
    assert_difference('Foo.count', -1) do
      delete foo_url(@foo)
    end

    assert_redirected_to foos_url
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
sandboxy-1.1.1 examples/rails_example/test/controllers/foos_controller_test.rb
sandboxy-1.1.0 examples/rails_example/test/controllers/foos_controller_test.rb
sandboxy-1.0.0 examples/rails_example/test/controllers/foos_controller_test.rb