Skip to content

Commit

Permalink
[ci] Migration of project controller tests: subprojects action
Browse files Browse the repository at this point in the history
  • Loading branch information
Moises Deniz Aleman committed Apr 4, 2016
1 parent 6682718 commit d462ee3
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/api/spec/controllers/webui/project_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,17 @@
end

describe 'GET #subprojects' do
before do
create(:project, name: 'Apache')
@project = create(:project, name: 'Apache:Apache2')
create(:project, name: 'Apache:Apache2:TestSubproject')
create(:project, name: 'Apache:Apache2:TestSubproject2')
create(:project, name: 'Another_Project')
get :subprojects, project: @project
end

it { expect(assigns(:subprojects)).to match_array(@project.subprojects) }
it { expect(assigns(:parentprojects)).to match_array(@project.ancestors) }
end

describe 'GET #new' do
Expand Down

0 comments on commit d462ee3

Please sign in to comment.