15855.patch

Takenori TAKAKI, 2021-08-11 01:16

Download (3.1 KB)

View differences:

app/views/issues/index.api.rsb
4 4
      api.id issue.id
5 5
      api.project(:id => issue.project_id, :name => issue.project.name) unless issue.project.nil?
6 6
      api.tracker(:id => issue.tracker_id, :name => issue.tracker.name) unless issue.tracker.nil?
7
      api.status(:id => issue.status_id, :name => issue.status.name) unless issue.status.nil?
7
      api.status(:id => issue.status_id, :name => issue.status.name, :is_closed => issue.status.is_closed) unless issue.status.nil?
8 8
      api.priority(:id => issue.priority_id, :name => issue.priority.name) unless issue.priority.nil?
9 9
      api.author(:id => issue.author_id, :name => issue.author.name) unless issue.author.nil?
10 10
      api.assigned_to(:id => issue.assigned_to_id, :name => issue.assigned_to.name) unless issue.assigned_to.nil?
app/views/issues/show.api.rsb
2 2
  api.id @issue.id
3 3
  api.project(:id => @issue.project_id, :name => @issue.project.name) unless @issue.project.nil?
4 4
  api.tracker(:id => @issue.tracker_id, :name => @issue.tracker.name) unless @issue.tracker.nil?
5
  api.status(:id => @issue.status_id, :name => @issue.status.name) unless @issue.status.nil?
5
  api.status(:id => @issue.status_id, :name => @issue.status.name, :is_closed => @issue.status.is_closed) unless @issue.status.nil?
6 6
  api.priority(:id => @issue.priority_id, :name => @issue.priority.name) unless @issue.priority.nil?
7 7
  api.author(:id => @issue.author_id, :name => @issue.author.name) unless @issue.author.nil?
8 8
  api.assigned_to(:id => @issue.assigned_to_id, :name => @issue.assigned_to.name) unless @issue.assigned_to.nil?
test/integration/api_test/issues_test.rb
141 141
    assert_select 'issues>issue>is_private', :text => 'false'
142 142
  end
143 143

  
144
  def test_index_should_include_issue_status_is_closed_false
145
    get '/issues.xml'
146
    assert_select 'issues>issue>status[is_closed=false]'
147
  end
148

  
149
  def test_index_should_include_issue_status_is_closed_true
150
    get '/issues.xml?status_id=5'
151
    assert_select 'issues>issue>status[is_closed=true]'
152
  end
153

  
144 154
  def test_index_should_include_spent_hours
145 155
    Issue.delete_all
146 156
    parent = Issue.generate!(:estimated_hours => 2.0)
......
391 401
  def test_show_should_include_issue_attributes
392 402
    get '/issues/1.xml'
393 403
    assert_select 'issue>is_private', :text => 'false'
404
    assert_select 'issue>status[is_closed=false]'
394 405
  end
395 406

  
396 407
  test "GET /issues/:id.xml?include=watchers should include watchers" do