:journals, :journal_details
def test_project_index
- get :index, :params => {
+ get(
+ :index,
+ :params => {
:id => 1,
:with_subprojects => 0
}
+ )
assert_response :success
assert_select 'h3', :text => /#{2.days.ago.to_date.day}/
end
def test_project_index_with_invalid_project_id_should_respond_404
- get :index, :params => {
- :id => 299
- }
+ get(:index, :params => {:id => 299})
assert_response 404
end
def test_previous_project_index
@request.session[:user_id] = 1
- get :index, :params => {
+ get(
+ :index,
+ :params => {
:id => 1,
:from => 2.days.ago.to_date
}
+ )
assert_response :success
assert_select 'h3', :text => /#{User.current.time_to_date(3.days.ago).day}/
def test_user_index
@request.session[:user_id] = 1
- get :index, :params => {
+ get(
+ :index,
+ :params => {
:user_id => 2
}
+ )
assert_response :success
assert_select 'h2 a[href="/users/2"]', :text => 'John Smith'
end
def test_user_index_with_invalid_user_id_should_respond_404
- get :index, :params => {
+ get(
+ :index,
+ :params => {
:user_id => 299
}
+ )
assert_response 404
end
def test_index_atom_feed
- get :index, :params => {
+ get(
+ :index,
+ :params => {
:format => 'atom',
:with_subprojects => 0
}
+ )
assert_response :success
assert_select 'feed' do
end
def test_index_atom_feed_with_explicit_selection
- get :index, :params => {
+ get(
+ :index,
+ :params => {
:format => 'atom',
:with_subprojects => 0,
:show_changesets => 1,
:show_time_entries => 1,
:show_wiki_edits => 1
}
-
+ )
assert_response :success
assert_select 'feed' do
def test_index_atom_feed_with_one_item_type
with_settings :default_language => 'en' do
- get :index, :params => {
+ get(
+ :index,
+ :params => {
:format => 'atom',
:show_issues => '1'
}
+ )
assert_response :success
-
assert_select 'title', :text => /Issues/
end
end
def test_index_atom_feed_with_user
- get :index, :params => {
+ get(
+ :index,
+ :params => {
:user_id => 2,
:format => 'atom'
}
-
+ )
assert_response :success
assert_select 'title', :text => "Redmine: #{User.find(2).name}"
end
def test_index_with_submitted_scope_should_save_as_preference
@request.session[:user_id] = 2
-
- get :index, :params => {
+ get(
+ :index,
+ :params => {
:show_issues => '1',
:show_messages => '1',
:submit => 'Apply'
}
+ )
assert_response :success
assert_equal %w(issues messages), User.find(2).pref.activity_scope.sort
end
def test_index_up_to_yesterday_should_show_next_page_link
@request.session[:user_id] = 2
-
- get :index, :params => {
- :from => (User.find(2).today-1)
+ get(
+ :index,
+ :params => {
+ :from => (User.find(2).today - 1)
}
+ )
assert_response :success
assert_select '.pagination a', :text => /Previous/
assert_select '.pagination a', :text => /Next/