Skip to content

Commit

Permalink
Adds test for staticAssets input handling
Browse files Browse the repository at this point in the history
  • Loading branch information
AtiX committed Oct 11, 2016
1 parent 350af54 commit 4efb1be
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 9 deletions.
23 changes: 23 additions & 0 deletions test/availableBricks/staticAssets.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
chai = require 'chai'
expect = chai.expect

StaticAssets = require '../../src/availableBricks/staticAssets'

describe 'StaticAssets', ->
it 'should handle strings and object as input data', ->
testInput = [
'myStringPath'
{ urlRoot: '/myUrlPathRoot', path: 'myUrlPathPath' }
]

expectedOutput = [
{ urlRoot: '/', path: 'myStringPath' }
{ urlRoot: '/myUrlPathRoot', path: 'myUrlPathPath' }
]

staticAssetsBrick = new StaticAssets()

actualOutput = staticAssetsBrick._ensureUrlAndPath testInput
expect(actualOutput).to.eql expectedOutput
return
return
9 changes: 0 additions & 9 deletions test/dummyTest.coffee

This file was deleted.

0 comments on commit 4efb1be

Please sign in to comment.