Skip to content
This repository has been archived by the owner on May 10, 2019. It is now read-only.

Commit

Permalink
ensure no-ui-slider has start value
Browse files Browse the repository at this point in the history
  • Loading branch information
bantic committed Jan 16, 2015
1 parent f8a9de9 commit 8e25571
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 13 deletions.
5 changes: 5 additions & 0 deletions app/components/no-ui-slider/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ export default Ember.Component.extend({
rangeMax: 0,
step: null,

validateProperties: function(){
Ember.assert('no-ui-slider must have a value for `start`',
!Ember.isBlank(this.get('start')));
}.on('init'),

initializeSlider: function(){
var options = {
start: [this.get('start')],
Expand Down
12 changes: 1 addition & 11 deletions tests/acceptance/apps-show-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,7 @@ test('visiting /apps/my-app-id shows basic app info', function() {
return this.success({
id: appId,
handle: 'my-app',
_links: { services: { href: '/apps/' + appId + '/services' } }
});
});

stubRequest('get', '/apps/' + appId + '/services', function(request){
return this.success({
_embedded: {
services: [{
id: serviceId
}]
}
_embedded: { services: [] }
});
});

Expand Down
6 changes: 4 additions & 2 deletions tests/helpers/aptible-helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,8 @@ Ember.Test.registerHelper('stubStacks', function(app, options){
_embedded: {
services: [{
id: '1',
handle: 'the-service'
handle: 'the-service',
container_count: 1
}]
}
}, {
Expand All @@ -180,7 +181,8 @@ Ember.Test.registerHelper('stubStacks', function(app, options){
_embedded: {
services: [{
id: '2',
handle: 'the-service-2'
handle: 'the-service-2',
container_count: 1
}]
}
}]
Expand Down

0 comments on commit 8e25571

Please sign in to comment.