Created
October 2, 2013 14:40
-
-
Save michal-lipski/6794811 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test | |
public void document_from_my_company_are_visible_to_me() throws Exception { | |
Document document = new Document(DOC_ID).company(ORG_ID); | |
when(documentManagementService.findById(DOC_ID)).thenReturn(document); | |
when(userContext.getMyCompanyId()).thenReturn(ORG_ID); | |
boolean accessibleToMe = permissionService.isDocumentAccesibleToMe(DOC_ID); | |
assertThat(accessibleToMe).isTrue(); | |
} | |
@Test | |
public void document_from_my_company_are_visible_to_me() throws Exception { | |
iAmUserFromCompany(ORANGE); | |
boolean accessibleToMe = isDocumentAccesibleToMe(documentFromCompany(ORANGE)); | |
assertThat(accessibleToMe).isTrue(); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
extract documentFromCompany(ORANGE)