Sha256: edbc429fcde8a3078febe155b947761d89ce0436b3ba211acc33032341b0f80b
Contents?: true
Size: 1.29 KB
Versions: 6
Compression:
Stored size: 1.29 KB
Contents
require 'test_helper' module Wafflemix class PortfoliosControllerTest < ActionController::TestCase setup do @portfolio = portfolios(:one) end test "should get index" do get :index assert_response :success assert_not_nil assigns(:portfolios) end test "should get new" do get :new assert_response :success end test "should create portfolio" do assert_difference('Portfolio.count') do post :create, portfolio: { content: @portfolio.content, intro: @portfolio.intro, title: @portfolio.title } end assert_redirected_to portfolio_path(assigns(:portfolio)) end test "should show portfolio" do get :show, id: @portfolio assert_response :success end test "should get edit" do get :edit, id: @portfolio assert_response :success end test "should update portfolio" do put :update, id: @portfolio, portfolio: { content: @portfolio.content, intro: @portfolio.intro, title: @portfolio.title } assert_redirected_to portfolio_path(assigns(:portfolio)) end test "should destroy portfolio" do assert_difference('Portfolio.count', -1) do delete :destroy, id: @portfolio end assert_redirected_to portfolios_path end end end
Version data entries
6 entries across 6 versions & 1 rubygems