Skip to content

Commit

Permalink
[APB-1887][JR,RV] Resolving build failure after automatic merge (#68)
Browse files Browse the repository at this point in the history
  • Loading branch information
johnrevill authored and rvijayan committed Feb 8, 2018
1 parent 6504f62 commit da9da0b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -751,13 +751,13 @@ class RelationshipISpec extends UnitSpec

//HAPPY PATHS WHEN RELATIONSHIP COPY ATTEMPT FAILS

"return 200 when relationship exists only in HMCE-VATDEC-ORG and relationship copy attempt fails because of etmp" ignore {
"return 200 when relationship exists only in HMCE-VATDEC-ORG and relationship copy attempt fails because of etmp" in {
givenAgentCredentialsAreFoundFor(Arn(arn), "foo")
givenAgentCodeIsFoundFor("foo", "bar")
givenAgentIsNotAllocatedToClient(vrn)
givenArnIsKnownFor(Arn(arn), Vrn(agentVrn))
givenAgentIsAllocatedAndAssignedToClient(vrn, agentVrn)
givenAgentCanNotBeAllocatedInDes //TODO Implement new stub after APB-1987
givenAgentCanNotBeAllocatedInDes
givenAgentCanBeAllocatedInGovernmentGateway(vrn, "bar")
givenAuditConnector()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -669,13 +669,7 @@ class RelationshipsServiceSpec extends UnitSpec
}

private def relationshipWillBeCreated(identifier: TaxIdentifier): Unit = {
identifier match {
case mtdItId @ MtdItId(_) =>
when(des.createAgentRelationship(eqs(mtdItId), eqs(arn))(eqs(hc), eqs(ec))).thenReturn(Future successful RegistrationRelationshipResponse("processing date"))
case vrn @ Vrn(_) =>
when(des.createUpdateAgentRelationshipRosm(eqs(vrn), eqs(arn))(eqs(hc), eqs(ec))).thenReturn(Future successful RegistrationRelationshipResponse("processing date"))
}

when(des.createAgentRelationship(eqs(identifier), eqs(arn))(eqs(hc), eqs(ec))).thenReturn(Future successful RegistrationRelationshipResponse("processing date"))
when(gg.allocateAgent(eqs(agentCode), eqs(identifier))(eqs(hc))).thenReturn(Future successful true)
}

Expand All @@ -688,14 +682,13 @@ class RelationshipsServiceSpec extends UnitSpec
}

def verifyEtmpRecordCreatedForMtdVat(): Unit = {
verify(des).createUpdateAgentRelationshipRosm(eqs(vrn), eqs(arn))(eqs(hc), eqs(ec))
verify(des).createAgentRelationship(eqs(vrn), eqs(arn))(eqs(hc), eqs(ec))
}

def verifyEtmpRecordNotCreatedForMtdVat(): Unit = {
verify(des, never()).createUpdateAgentRelationshipRosm(eqs(vrn), eqs(arn))(eqs(hc), eqs(ec))
verify(des, never()).createAgentRelationship(eqs(vrn), eqs(arn))(eqs(hc), eqs(ec))
}


def verifyGgRecordCreated(): Unit = {
verify(gg).allocateAgent(eqs(agentCode), eqs(mtdItId))(eqs(hc))
}
Expand Down

0 comments on commit da9da0b

Please sign in to comment.