Project

General

Profile

Defect #26667 » add_subproject_filter_test_for_time_entries.patch

Marius BĂLTEANU, 2017-08-20 12:15

View differences:

test/functional/queries_controller_test.rb
606 606
    json = ActiveSupport::JSON.decode(response.body)
607 607
    assert_include ["OnlineStore - Systemwide visible version", "7", "open"], json
608 608
  end
609

  
610
  def test_subproject_filter_time_entries_with_project_id_should_return_filter_values
611
    @request.session[:user_id] = 2
612
    get :filter, :params => {
613
        :project_id => 1,
614
        :type => 'TimeEntryQuery',
615
        :name => 'subproject_id'
616
      }
617

  
618
    assert_response :success
619
    assert_equal 'application/json', response.content_type
620
    json = ActiveSupport::JSON.decode(response.body)
621
    assert_equal 4, json.count
622
    assert_include ["Private child of eCookbook","5"], json
623
  end
609 624
end
(5-5/5)