Sha256: 7e88d08a9b468b666a185127c6768eee3ca3658c5bc39cdc7c21c8c196855d06
Contents?: true
Size: 1.28 KB
Versions: 24
Compression:
Stored size: 1.28 KB
Contents
require 'test_helper' module KepplerLanguages class FieldsControllerTest < ActionDispatch::IntegrationTest include Engine.routes.url_helpers setup do @field = keppler_languages_fields(:one) end test "should get index" do get fields_url assert_response :success end test "should get new" do get new_field_url assert_response :success end test "should create field" do assert_difference('Field.count') do post fields_url, params: { field: { deleted_at: @field.deleted_at, key: @field.key, position: @field.position, value: @field.value } } end assert_redirected_to field_url(Field.last) end test "should show field" do get field_url(@field) assert_response :success end test "should get edit" do get edit_field_url(@field) assert_response :success end test "should update field" do patch field_url(@field), params: { field: { deleted_at: @field.deleted_at, key: @field.key, position: @field.position, value: @field.value } } assert_redirected_to field_url(@field) end test "should destroy field" do assert_difference('Field.count', -1) do delete field_url(@field) end assert_redirected_to fields_url end end end
Version data entries
24 entries across 24 versions & 1 rubygems