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