Sha256: efddd338a40f3c2953689c3b7970dbab5bfdb8d95dcf63e3d941a3c5d67b3485
Contents?: true
Size: 1.3 KB
Versions: 4
Compression:
Stored size: 1.3 KB
Contents
require 'test_helper' class OthersControllerTest < ActionController::TestCase test "should get index" do @other = FactoryGirl.create(:other) get :index assert_response :success assert_not_nil assigns(:others) end test "should get new" do @other = Other.new get :new assert_response :success end test "should create other" do @other = FactoryGirl.build(:other) assert_difference('Other.count') do post :create, other: { content: @other.content, name: @other.name, permalink: @other.permalink } end assert_redirected_to other_path(assigns(:other)) end test "should show other" do @other = FactoryGirl.create(:other) get :show, id: @other assert_response :success end test "should get edit" do @other = FactoryGirl.create(:other) get :edit, id: @other assert_response :success end test "should update other" do @other = FactoryGirl.create(:other) patch :update, id: @other, other: { content: @other.content, name: @other.name, permalink: @other.permalink } assert_redirected_to other_path(assigns(:other)) end test "should destroy other" do @other = FactoryGirl.create(:other) assert_difference('Other.count', -1) do delete :destroy, id: @other end assert_redirected_to others_path end end
Version data entries
4 entries across 4 versions & 1 rubygems