Created
August 10, 2008 18:19
-
-
Save karmi/4756 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def test_should_not_list_unpublished_projects | |
get :index | |
assert_equal 13, assigns(:projects).size | |
assert assigns(:projects).delete_if { |p| p.published? }.empty? | |
end | |
def test_should_show_404_when_trying_to_get_not_published_project | |
get :show, :id => 14 | |
assert assigns(:project) | |
assert_response :not_found | |
assert_select 'h1', :text => 'Stránka nebyla nalezena' | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment