##// END OF EJS Templates
Fixed that logging time inside redirects at global time logging (#11038)....
Jean-Philippe Lang -
r9557:53a0cee57a0b
parent child
Show More
@@ -1,6 +1,7
1 <h2><%= l(:label_spent_time) %></h2>
1 <h2><%= l(:label_spent_time) %></h2>
2
2
3 <%= labelled_form_for @time_entry, :url => time_entries_path do |f| %>
3 <%= labelled_form_for @time_entry, :url => time_entries_path do |f| %>
4 <%= hidden_field_tag 'project_id', params[:project_id] if params[:project_id] %>
4 <%= render :partial => 'form', :locals => {:f => f} %>
5 <%= render :partial => 'form', :locals => {:f => f} %>
5 <%= submit_tag l(:button_create) %>
6 <%= submit_tag l(:button_create) %>
6 <%= submit_tag l(:button_create_and_continue), :name => 'continue' %>
7 <%= submit_tag l(:button_create_and_continue), :name => 'continue' %>
@@ -44,6 +44,7 class TimelogControllerTest < ActionController::TestCase
44 # Default activity selected
44 # Default activity selected
45 assert_tag :tag => 'option', :attributes => { :selected => 'selected' },
45 assert_tag :tag => 'option', :attributes => { :selected => 'selected' },
46 :content => 'Development'
46 :content => 'Development'
47 assert_select 'input[name=project_id][value=1]'
47 end
48 end
48
49
49 def test_get_new_should_only_show_active_time_entry_activities
50 def test_get_new_should_only_show_active_time_entry_activities
@@ -61,6 +62,7 class TimelogControllerTest < ActionController::TestCase
61 assert_response :success
62 assert_response :success
62 assert_template 'new'
63 assert_template 'new'
63 assert_tag 'select', :attributes => {:name => 'time_entry[project_id]'}
64 assert_tag 'select', :attributes => {:name => 'time_entry[project_id]'}
65 assert_select 'input[name=project_id]', 0
64 end
66 end
65
67
66 def test_new_without_project_should_deny_without_permission
68 def test_new_without_project_should_deny_without_permission
General Comments 0
You need to be logged in to leave comments. Login now