Skip to content
This repository was archived by the owner on Oct 2, 2025. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ class BuildControllerSpec extends Specification {

given:
1 * igorService.getBuildMasters(masterType) >> jenkinsMasters
0 * igorService.getBuildMasters('wercker') >> _
0 * igorService.getBuildMasters() >> _

when:
Expand All @@ -93,26 +92,6 @@ class BuildControllerSpec extends Specification {
endpoint << ["/v2/builds", "/v3/builds"]
}

@Unroll
void 'should get a list of wercker masters'() {
def masterType = 'wercker'
def werckerMasters = ['wercker-prod', 'wercker-staging']

given:
1 * igorService.getBuildMasters(masterType) >> werckerMasters
0 * igorService.getBuildMasters('jenkins') >> _
0 * igorService.getBuildMasters() >> _

when:
MockHttpServletResponse response = mockMvc.perform(get(endpoint).param('type', masterType)
.accept(MediaType.APPLICATION_JSON)).andReturn().response

then:
new JsonSlurper().parseText(response.contentAsString) == werckerMasters

where:
endpoint << ["/v2/builds", "/v3/builds"]
}

@Unroll
void 'should get a list of jobs for a master'() {
Expand Down