Mercurial > hg > soundsoftware-site
comparison test/functional/.svn/text-base/gantts_controller_test.rb.svn-base @ 117:af80e5618e9b redmine-1.1
* Update to Redmine 1.1-stable branch (Redmine SVN rev 4707)
author | Chris Cannam |
---|---|
date | Thu, 13 Jan 2011 12:53:21 +0000 |
parents | 94944d00e43c |
children |
comparison
equal
deleted
inserted
replaced
39:150ceac17a8d | 117:af80e5618e9b |
---|---|
1 require File.dirname(__FILE__) + '/../test_helper' | 1 require File.expand_path('../../test_helper', __FILE__) |
2 | 2 |
3 class GanttsControllerTest < ActionController::TestCase | 3 class GanttsControllerTest < ActionController::TestCase |
4 fixtures :all | 4 fixtures :all |
5 | 5 |
6 context "#gantt" do | 6 context "#gantt" do |
47 assert_not_nil assigns(:gantt) | 47 assert_not_nil assigns(:gantt) |
48 assert_not_nil assigns(:gantt).query | 48 assert_not_nil assigns(:gantt).query |
49 assert_nil assigns(:gantt).project | 49 assert_nil assigns(:gantt).project |
50 end | 50 end |
51 | 51 |
52 should "not disclose private projects" do | |
53 get :show | |
54 assert_response :success | |
55 assert_template 'show.html.erb' | |
56 | |
57 assert_tag 'a', :content => /eCookbook/ | |
58 # Root private project | |
59 assert_no_tag 'a', {:content => /OnlineStore/} | |
60 # Private children of a public project | |
61 assert_no_tag 'a', :content => /Private child of eCookbook/ | |
62 end | |
63 | |
52 should "export to pdf" do | 64 should "export to pdf" do |
53 get :show, :project_id => 1, :format => 'pdf' | 65 get :show, :project_id => 1, :format => 'pdf' |
54 assert_response :success | 66 assert_response :success |
55 assert_equal 'application/pdf', @response.content_type | 67 assert_equal 'application/pdf', @response.content_type |
56 assert @response.body.starts_with?('%PDF') | 68 assert @response.body.starts_with?('%PDF') |