Sha256: 74e552700bf0c7d01c945412ab8e8029c9fb699e8963aad484b1b0ac451571b8
Contents?: true
Size: 473 Bytes
Versions: 17
Compression:
Stored size: 473 Bytes
Contents
require 'test_controller' require 'test_helper' class PostsControllerTest < TestController tests PostsController setup do @routes = Ecrire::Theme::Engine.routes end test "redirect if page doesn't exist" do get :show, year: 323, month: 1, id: "doesn't exist" assert_redirected_to '/' end test 'show post if it exists' do p = Post.published.first get :show, year: p.year, month: p.month, id: p.slug assert_response :success end end
Version data entries
17 entries across 17 versions & 1 rubygems