Mercurial > hg > soundsoftware-site
comparison test/functional/previews_controller_test.rb @ 1517:dffacf8a6908 redmine-2.5
Update to Redmine SVN revision 13367 on 2.5-stable branch
author | Chris Cannam |
---|---|
date | Tue, 09 Sep 2014 09:29:00 +0100 |
parents | e248c7af89ec |
children |
comparison
equal
deleted
inserted
replaced
1516:b450a9d58aed | 1517:dffacf8a6908 |
---|---|
30 | 30 |
31 def test_preview_new_issue | 31 def test_preview_new_issue |
32 @request.session[:user_id] = 2 | 32 @request.session[:user_id] = 2 |
33 post :issue, :project_id => '1', :issue => {:description => 'Foo'} | 33 post :issue, :project_id => '1', :issue => {:description => 'Foo'} |
34 assert_response :success | 34 assert_response :success |
35 assert_template 'preview' | 35 assert_template 'previews/issue' |
36 assert_not_nil assigns(:description) | 36 assert_not_nil assigns(:description) |
37 end | 37 end |
38 | 38 |
39 def test_preview_issue_notes | 39 def test_preview_issue_notes |
40 @request.session[:user_id] = 2 | 40 @request.session[:user_id] = 2 |
41 post :issue, :project_id => '1', :id => 1, | 41 post :issue, :project_id => '1', :id => 1, |
42 :issue => {:description => Issue.find(1).description, :notes => 'Foo'} | 42 :issue => {:description => Issue.find(1).description, :notes => 'Foo'} |
43 assert_response :success | 43 assert_response :success |
44 assert_template 'preview' | 44 assert_template 'previews/issue' |
45 assert_not_nil assigns(:notes) | 45 assert_not_nil assigns(:notes) |
46 end | 46 end |
47 | 47 |
48 def test_preview_journal_notes_for_update | 48 def test_preview_journal_notes_for_update |
49 @request.session[:user_id] = 2 | 49 @request.session[:user_id] = 2 |
50 post :issue, :project_id => '1', :id => 1, :notes => 'Foo' | 50 post :issue, :project_id => '1', :id => 1, :notes => 'Foo' |
51 assert_response :success | 51 assert_response :success |
52 assert_template 'preview' | 52 assert_template 'previews/issue' |
53 assert_not_nil assigns(:notes) | 53 assert_not_nil assigns(:notes) |
54 assert_tag :p, :content => 'Foo' | 54 assert_tag :p, :content => 'Foo' |
55 end | |
56 | |
57 def test_preview_issue_notes_should_support_links_to_existing_attachments | |
58 Attachment.generate!(:container => Issue.find(1), :filename => 'foo.bar') | |
59 @request.session[:user_id] = 2 | |
60 post :issue, :project_id => '1', :id => 1, :notes => 'attachment:foo.bar' | |
61 assert_response :success | |
62 assert_select 'a.attachment', :text => 'foo.bar' | |
55 end | 63 end |
56 | 64 |
57 def test_preview_new_news | 65 def test_preview_new_news |
58 get :news, :project_id => 1, | 66 get :news, :project_id => 1, |
59 :news => {:title => '', | 67 :news => {:title => '', |