<h2><%= l(:label_spent_time) %></h2>
<%= labelled_form_for @time_entry, :url => time_entries_path do |f| %>
+ <%= hidden_field_tag 'project_id', params[:project_id] if params[:project_id] %>
<%= render :partial => 'form', :locals => {:f => f} %>
<%= submit_tag l(:button_create) %>
<%= submit_tag l(:button_create_and_continue), :name => 'continue' %>
# Default activity selected
assert_tag :tag => 'option', :attributes => { :selected => 'selected' },
:content => 'Development'
+ assert_select 'input[name=project_id][value=1]'
end
def test_get_new_should_only_show_active_time_entry_activities
assert_response :success
assert_template 'new'
assert_tag 'select', :attributes => {:name => 'time_entry[project_id]'}
+ assert_select 'input[name=project_id]', 0
end
def test_new_without_project_should_deny_without_permission