Project

General

Profile

Feature #17628 ยป 0001-Adds-project-is_public-to-GET-projects-id-and-projec.patch

Michael Esemplare, 2014-08-14 13:08

View differences:

app/views/projects/index.api.rsb
7 7
      api.description project.description
8 8
      api.parent(:id => project.parent.id, :name => project.parent.name) if project.parent && project.parent.visible?
9 9
      api.status      project.status
10
      api.is_public   project.is_public?
10 11

  
11 12
      render_api_custom_values project.visible_custom_field_values, api
12 13

  
app/views/projects/show.api.rsb
6 6
  api.homepage    @project.homepage
7 7
  api.parent(:id => @project.parent.id, :name => @project.parent.name) if @project.parent && @project.parent.visible?
8 8
  api.status      @project.status
9
  api.is_public   @project.is_public?
9 10

  
10 11
  render_api_custom_values @project.visible_custom_field_values, api
11 12

  
test/integration/api_test/projects_test.rb
51 51

  
52 52
    assert_select 'projects>project>id', :text => '1'
53 53
    assert_select 'projects>project>status', :text => '1'
54
    assert_select 'projects>project>is_public', :text => 'true'
54 55
  end
55 56

  
56 57
  test "GET /projects.json should return projects" do
......
72 73

  
73 74
    assert_select 'project>id', :text => '1'
74 75
    assert_select 'project>status', :text => '1'
76
    assert_select 'project>is_public', :text => 'true'
75 77
    assert_select 'custom_field[name=Development status]', :text => 'Stable'
76 78

  
77 79
    assert_no_tag 'trackers'
    (1-1/1)