Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:luckymarmot/API-Flow into develop
Browse files Browse the repository at this point in the history
# Conflicts:
#	configs/node/api-flow-config.js
#	configs/web/api-flow-config.js
#	configs/webworker/api-flow-config.js
  • Loading branch information
Phil Sturgeon committed Nov 28, 2017
2 parents 897505e + 24cc71a commit f7ff66a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/serializers/paw/Serializer.js
Original file line number Diff line number Diff line change
Expand Up @@ -1029,12 +1029,12 @@ methods.getContainerFromRequest = (request) => {
* converts an auth into a DynamicString from a reference.
* @param {Store} store: the store to use to resolve the reference
* @param {Reference} reference: the reference to an EnvironmentVariable representing an Auth.
* @returns {DynamicString} the corresponding DynamicString
* @returns {{ variable: DynamicString, auth: Auth }} the corresponding DynamicString
*/
methods.convertAuthFromReference = (store, reference) => {
const variable = store.getIn([ 'auth', reference.get('uuid') ])
const { variable, auth } = store.getIn([ 'auth', reference.get('uuid') ])
const ds = variable.createDynamicString()
return ds
return { variable: ds, auth: auth }
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/serializers/paw/__tests__/Serializer.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2010,12 +2010,12 @@ describe('serializers/paw/Serializer.js', () => {
spyOn(variable, 'createDynamicString').andReturn(123)

const store = new Store({
auth: OrderedMap({ a: variable })
auth: OrderedMap({ a: { variable: variable, auth: 'my-auth' } })
})

const ref = new Reference({ uuid: 'a' })

const expected = 123
const expected = { auth: 'my-auth', variable: 123 }
const actual = __internals__.convertAuthFromReference(store, ref)

expect(actual).toEqual(expected)
Expand Down

0 comments on commit f7ff66a

Please sign in to comment.