Sha256: 6bb5f1fb18994e9f23d1b396b0b0c7c6cc7d355fca0f7547640526e83b74ec90
Contents?: true
Size: 1.14 KB
Versions: 24
Compression:
Stored size: 1.14 KB
Contents
require 'test_helper' module Flexite class EntriesControllerTest < ActionController::TestCase setup do @entry = entries(:one) end test "should get index" do get :index assert_response :success assert_not_nil assigns(:entries) end test "should get new" do get :new assert_response :success end test "should create entry" do assert_difference('Entry.count') do post :create, entry: { type: @entry.type, value: @entry.value } end assert_redirected_to entry_path(assigns(:entry)) end test "should show entry" do get :show, id: @entry assert_response :success end test "should get edit" do get :edit, id: @entry assert_response :success end test "should update entry" do put :update, id: @entry, entry: { type: @entry.type, value: @entry.value } assert_redirected_to entry_path(assigns(:entry)) end test "should destroy entry" do assert_difference('Entry.count', -1) do delete :destroy, id: @entry end assert_redirected_to entries_path end end end
Version data entries
24 entries across 24 versions & 1 rubygems