Skip to content

Commit

Permalink
MULE-12482: Fix test broken by DW (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
elrodro83 authored and marianogonzalez committed May 16, 2017
1 parent 08fbaab commit dc8c7de
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import static org.junit.Assert.assertThat;
import static org.mockito.Matchers.anyString;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;

import org.mule.extension.oauth2.internal.authorizationcode.state.ConfigOAuthContext;
import org.mule.runtime.api.lock.LockFactory;
Expand All @@ -19,7 +20,6 @@

import org.junit.Test;
import org.mockito.Answers;
import org.mockito.Mockito;

@SmallTest
public class ConfigOAuthContextTestCase extends AbstractMuleTestCase {
Expand All @@ -31,7 +31,7 @@ public class ConfigOAuthContextTestCase extends AbstractMuleTestCase {

@Test
public void nonExistentUserIdReturnNewConfig() throws Exception {
Mockito.when(mockObjectStore.contains(anyString())).thenReturn(false);
when(mockObjectStore.contains(anyString())).thenReturn(false);
assertThat(new ConfigOAuthContext(mockLockFactory, mockObjectStore, TEST_CONFIG_NAME).getContextForResourceOwner(USER_ID),
notNullValue());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
externalCallbackUrl="${local.callback.url}"
localAuthorizationUrlResourceOwnerId="#[attributes.queryParams.userId]"
tokenManager="tokenManagerConfig"
state="#[attributes.queryParams.state when attributes.queryParams.state != null otherwise '']"
state="#[if (attributes.queryParams.state != null) attributes.queryParams.state else '']"
localAuthorizationUrl="${local.authorization.url}"
authorizationUrl="${authorization.url}"
tokenUrl="${token.url}">
Expand Down

0 comments on commit dc8c7de

Please sign in to comment.