@@ -1,6 +1,7 | |||
|
1 | 1 | <h2><%= l(:label_spent_time) %></h2> |
|
2 | 2 | |
|
3 | 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 | 5 | <%= render :partial => 'form', :locals => {:f => f} %> |
|
5 | 6 | <%= submit_tag l(:button_create) %> |
|
6 | 7 | <%= submit_tag l(:button_create_and_continue), :name => 'continue' %> |
@@ -44,6 +44,7 class TimelogControllerTest < ActionController::TestCase | |||
|
44 | 44 | # Default activity selected |
|
45 | 45 | assert_tag :tag => 'option', :attributes => { :selected => 'selected' }, |
|
46 | 46 | :content => 'Development' |
|
47 | assert_select 'input[name=project_id][value=1]' | |
|
47 | 48 | end |
|
48 | 49 | |
|
49 | 50 | def test_get_new_should_only_show_active_time_entry_activities |
@@ -61,6 +62,7 class TimelogControllerTest < ActionController::TestCase | |||
|
61 | 62 | assert_response :success |
|
62 | 63 | assert_template 'new' |
|
63 | 64 | assert_tag 'select', :attributes => {:name => 'time_entry[project_id]'} |
|
65 | assert_select 'input[name=project_id]', 0 | |
|
64 | 66 | end |
|
65 | 67 | |
|
66 | 68 | def test_new_without_project_should_deny_without_permission |
General Comments 0
You need to be logged in to leave comments.
Login now