Redmine 4.1.7
This commit is contained in:
parent
55458d3479
commit
3ca3c37487
103 changed files with 2426 additions and 431 deletions
|
@ -818,4 +818,28 @@ class QueriesControllerTest < Redmine::ControllerTest
|
|||
assert_include ["Dave Lopper", "3", "active"], json
|
||||
assert_include ["Dave2 Lopper2", "5", "locked"], json
|
||||
end
|
||||
|
||||
def test_activity_filter_should_return_active_and_system_activity_ids
|
||||
TimeEntryActivity.create!(:name => 'Design', :parent_id => 9, :project_id => 1)
|
||||
TimeEntryActivity.create!(:name => 'QA', :active => false, :parent_id => 11, :project_id => 1)
|
||||
TimeEntryActivity.create!(:name => 'Inactive Activity', :active => true, :parent_id => 14, :project_id => 1)
|
||||
|
||||
@request.session[:user_id] = 2
|
||||
get(
|
||||
:filter,
|
||||
:params => {
|
||||
:project_id => 1,
|
||||
:type => 'TimeEntryQuery',
|
||||
:name => 'activity_id'
|
||||
}
|
||||
)
|
||||
assert_response :success
|
||||
assert_equal 'application/json', response.media_type
|
||||
json = ActiveSupport::JSON.decode(response.body)
|
||||
|
||||
assert_equal 3, json.count
|
||||
assert_include ["Design", "9"], json
|
||||
assert_include ["Development", "10"], json
|
||||
assert_include ["Inactive Activity", "14"], json
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue