Sha256: bb5706b4fe65b7dc3c392efe03c54d99888e0b282ba98ff30ed34053d18d58eb
Contents?: true
Size: 491 Bytes
Versions: 3
Compression:
Stored size: 491 Bytes
Contents
class PostsControllerTest < BaseControllerTest test "redirect if the post isn't published" do @post = posts(:draft) get :show, year: 2003, month: 1, id: @post.id assert_redirected_to :root end test "redirect if the post doesn't exist" do get :show, year: 2003, month: 1, id: -1 assert_redirected_to :root end test 'Only published posts should be listed in the index' do get :index posts.each do |post| assert post.published? end end end
Version data entries
3 entries across 3 versions & 1 rubygems