##// END OF EJS Templates
Adds functional tests....
Jean-Philippe Lang -
r8834:71c83e115507
parent child
Show More
@@ -36,6 +36,25 class FilesControllerTest < ActionController::TestCase
36 :attributes => { :href => '/attachments/download/9/version_file.zip' }
36 :attributes => { :href => '/attachments/download/9/version_file.zip' }
37 end
37 end
38
38
39 def test_new
40 @request.session[:user_id] = 2
41 get :new, :project_id => 1
42 assert_response :success
43 assert_template 'new'
44
45 assert_tag 'select', :attributes => {:name => 'version_id'}
46 end
47
48 def test_new_without_versions
49 Version.delete_all
50 @request.session[:user_id] = 2
51 get :new, :project_id => 1
52 assert_response :success
53 assert_template 'new'
54
55 assert_no_tag 'select', :attributes => {:name => 'version_id'}
56 end
57
39 def test_create_file
58 def test_create_file
40 set_tmp_attachments_directory
59 set_tmp_attachments_directory
41 @request.session[:user_id] = 2
60 @request.session[:user_id] = 2
General Comments 0
You need to be logged in to leave comments. Login now