Sha256: bc669c3715cce747fa8d4c218b41951317c1b20e6738013db7999a9a9de3ce4f
Contents?: true
Size: 598 Bytes
Versions: 6
Compression:
Stored size: 598 Bytes
Contents
require "test_helper" =begin What's being tested here? - Scopes Hey! I do not recommend setting a default_scope because you'll probably get unexpected results. This is here for testing purposes, but please, avoid using this kind of stuff. =end class Admin::PagesControllerTest < ActionController::TestCase setup do admin_sign_in Factory(:page) Factory(:page, :status => false) end teardown do Page.delete_all TypusUser.delete_all end test "get :index returns scoped results" do get :index assert_equal Page.all, assigns(:items) end end
Version data entries
6 entries across 6 versions & 1 rubygems