Sha256: 1e4e017dfd10bec4f3f019f9b50cf09837f24761d538ffd567a2095428e967f0

Contents?: true

Size: 1009 Bytes

Versions: 26

Compression:

Stored size: 1009 Bytes

Contents

require 'test_helper'

class NotesControllerTest < ActionController::TestCase
  setup do
    @note = notes(:one)
  end

  test "should get index" do
    get :index
    assert_response :success
    assert_not_nil assigns(:notes)
  end

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

  test "should create note" do
    assert_difference('Note.count') do
      post :create, note: @note.attributes
    end

    assert_redirected_to note_path(assigns(:note))
  end

  test "should show note" do
    get :show, id: @note.to_param
    assert_response :success
  end

  test "should get edit" do
    get :edit, id: @note.to_param
    assert_response :success
  end

  test "should update note" do
    put :update, id: @note.to_param, note: @note.attributes
    assert_redirected_to note_path(assigns(:note))
  end

  test "should destroy note" do
    assert_difference('Note.count', -1) do
      delete :destroy, id: @note.to_param
    end

    assert_redirected_to notes_path
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
jquery_mobile_rails-1.4.5 test/dummy/test/functional/notes_controller_test.rb
jquery_mobile_rails-1.4.4.1 test/dummy/test/functional/notes_controller_test.rb
jquery_mobile_rails-1.4.4 test/dummy/test/functional/notes_controller_test.rb
jquery_mobile_rails-1.4.3 test/dummy/test/functional/notes_controller_test.rb
jquery_mobile_rails-1.4.2 test/dummy/test/functional/notes_controller_test.rb
jquery_mobile_rails-1.4.1 test/dummy/test/functional/notes_controller_test.rb
jquery_mobile_rails-1.4.0 test/dummy/test/functional/notes_controller_test.rb
jquery_mobile_rails-1.4.0.rc.1 test/dummy/test/functional/notes_controller_test.rb
jquery_mobile_rails-1.4.0.beta.1 test/dummy/test/functional/notes_controller_test.rb
jquery_mobile_rails-1.3.2 test/dummy/test/functional/notes_controller_test.rb
jquery_mobile_rails-1.3.1 test/dummy/test/functional/notes_controller_test.rb
jquery_mobile_rails-1.3.0 test/dummy/test/functional/notes_controller_test.rb
jquery_mobile_rails-1.3.b1 test/dummy/test/functional/notes_controller_test.rb
jquery_mobile_rails-1.2.0 test/dummy/test/functional/notes_controller_test.rb
jquery_mobile_rails-1.1.1.1 test/dummy/test/functional/notes_controller_test.rb
jquery_mobile_rails-1.1.1 test/dummy/test/functional/notes_controller_test.rb
jquery_mobile_rails-1.1.0 test/dummy/test/functional/notes_controller_test.rb
jquery_mobile_rails-1.0.4 test/dummy/test/functional/notes_controller_test.rb
jquery_mobile_rails-1.0.3 test/dummy/test/functional/notes_controller_test.rb
jquery_mobile_rails-1.0.2 test/dummy/test/functional/notes_controller_test.rb