Sha256: 316ba969ecb7301cda801c3251c7e4d17c44f8bf70c334388771b18e0948c99b

Contents?: true

Size: 1.19 KB

Versions: 34

Compression:

Stored size: 1.19 KB

Contents

require 'test_helper'

class SettingsControllerTest < ActionController::TestCase
  setup do
    @setting = settings(:one)
  end

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

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

  test "should create setting" do
    assert_difference('Setting.count') do
      post :create, setting: { description: @setting.description, favicon: @setting.favicon, logo: @setting.logo, name: @setting.name }
    end

    assert_redirected_to setting_path(assigns(:setting))
  end

  test "should show setting" do
    get :show, id: @setting
    assert_response :success
  end

  test "should get edit" do
    get :edit, id: @setting
    assert_response :success
  end

  test "should update setting" do
    patch :update, id: @setting, setting: { description: @setting.description, favicon: @setting.favicon, logo: @setting.logo, name: @setting.name }
    assert_redirected_to setting_path(assigns(:setting))
  end

  test "should destroy setting" do
    assert_difference('Setting.count', -1) do
      delete :destroy, id: @setting
    end

    assert_redirected_to settings_path
  end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
keppler-2.1.22 installer/core/test/controllers/settings_controller_test.rb
keppler-2.1.21 installer/core/test/controllers/settings_controller_test.rb
keppler-2.1.20 installer/core/test/controllers/settings_controller_test.rb
keppler-2.1.19 installer/core/test/controllers/settings_controller_test.rb
keppler-2.1.18 installer/core/test/controllers/settings_controller_test.rb
keppler-2.1.17 installer/core/test/controllers/settings_controller_test.rb
keppler-2.1.16 installer/core/test/controllers/settings_controller_test.rb
keppler-2.1.15 installer/core/test/controllers/settings_controller_test.rb
keppler-2.1.14 installer/core/test/controllers/settings_controller_test.rb
keppler-2.1.13 installer/core/test/controllers/settings_controller_test.rb
keppler-2.1.12 installer/core/test/controllers/settings_controller_test.rb
keppler-2.1.11 installer/core/test/controllers/settings_controller_test.rb
keppler-2.1.10 installer/core/test/controllers/settings_controller_test.rb
keppler-2.1.9 installer/core/test/controllers/settings_controller_test.rb
keppler-2.1.8 installer/core/test/controllers/settings_controller_test.rb
keppler-2.1.7 installer/core/test/controllers/settings_controller_test.rb
keppler-2.1.6 installer/core/test/controllers/settings_controller_test.rb
keppler-2.1.5 installer/core/test/controllers/settings_controller_test.rb
keppler-2.1.4 installer/core/test/controllers/settings_controller_test.rb
keppler-2.1.3 installer/core/test/controllers/settings_controller_test.rb