Sha256: 8a0d5e7d97ca9097ca993835a48821efbd17ff01226d03596aec072f69173ffb

Contents?: true

Size: 1.12 KB

Versions: 4

Compression:

Stored size: 1.12 KB

Contents

require 'test_helper'

module MystroVolley
  class BranchesControllerTest < ActionController::TestCase
    setup do
      @branch = branches(:one)
    end
  
    test "should get index" do
      get :index
      assert_response :success
      assert_not_nil assigns(:branches)
    end
  
    test "should get new" do
      get :new
      assert_response :success
    end
  
    test "should create branch" do
      assert_difference('Branch.count') do
        post :create, branch: { name: @branch.name }
      end
  
      assert_redirected_to branch_path(assigns(:branch))
    end
  
    test "should show branch" do
      get :show, id: @branch
      assert_response :success
    end
  
    test "should get edit" do
      get :edit, id: @branch
      assert_response :success
    end
  
    test "should update branch" do
      put :update, id: @branch, branch: { name: @branch.name }
      assert_redirected_to branch_path(assigns(:branch))
    end
  
    test "should destroy branch" do
      assert_difference('Branch.count', -1) do
        delete :destroy, id: @branch
      end
  
      assert_redirected_to branches_path
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
mystro-volley-0.1.0 test/functional/mystro_volley/branches_controller_test.rb
mystro-volley-0.1.0.rc3 test/functional/mystro_volley/branches_controller_test.rb
mystro-volley-0.1.0.rc2 test/functional/mystro_volley/branches_controller_test.rb
mystro-volley-0.1.0.rc1 test/functional/mystro_volley/branches_controller_test.rb