Sha256: dec366b400cb958652027d253b3f49e9d0533799b8b740eb9e2b505b6b694556
Contents?: true
Size: 1.38 KB
Versions: 2
Compression:
Stored size: 1.38 KB
Contents
require 'test_helper' module Apidae class SelectionsControllerTest < ActionController::TestCase setup do @selection = apidae_selections(:one) @routes = Engine.routes end test "should get index" do get :index assert_response :success assert_not_nil assigns(:selections) end test "should get new" do get :new assert_response :success end test "should create selection" do assert_difference('Selection.count') do post :create, selection: { apidae_id: @selection.apidae_id, label: @selection.label, reference: @selection.reference } end assert_redirected_to selection_path(assigns(:selection)) end test "should show selection" do get :show, id: @selection assert_response :success end test "should get edit" do get :edit, id: @selection assert_response :success end test "should update selection" do patch :update, id: @selection, selection: { apidae_id: @selection.apidae_id, label: @selection.label, reference: @selection.reference } assert_redirected_to selection_path(assigns(:selection)) end test "should destroy selection" do assert_difference('Selection.count', -1) do delete :destroy, id: @selection end assert_redirected_to selections_path end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
apidae-0.7.5 | test/controllers/apidae/selections_controller_test.rb |
apidae-0.7.4 | test/controllers/apidae/selections_controller_test.rb |