Skip to content

Commit

Permalink
#387 closed
Browse files Browse the repository at this point in the history
  • Loading branch information
igorrKurr committed Jul 2, 2015
1 parent d97d400 commit 0aeef0f
Show file tree
Hide file tree
Showing 9 changed files with 1 addition and 111 deletions.
3 changes: 1 addition & 2 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
"bootstrap-sass-official": "~3.3.4",
"typeahead.js": "~0.11.1",
"jquery-ui-sortable": "*",
"jquery-ui-touch-punch": "*",
"chance": "~0.7.5"
"jquery-ui-touch-punch": "*"
}
}
3 changes: 0 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,5 @@
"ember-data": "1.13.4",
"ember-export-application-global": "^1.0.2",
"ember-watson": "^0.5.0"
},
"dependencies": {
"chance": "^0.7.3"
}
}
11 changes: 0 additions & 11 deletions tests/acceptance/form-test.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,15 @@
/* global chance*/

import Ember from 'ember';
import {module, test} from 'qunit';
import startApp from '../helpers/start-app';
// import Pretender from 'pretender';

var App;

module('Acceptance: Form', {
beforeEach: function() {
App = startApp();
// server = new Pretender(function() {
// var user_category = {id: 1, name: 'test', expired_at: new Date(), zip_code: '123456', description: chance.paragraph({sentences: 10}), is_created: true, email: 'foo@bar.com', color: '#AFAFAF' };

// this.get('/api/user_categories', function(request) {
// return [200, {"Content-Type": "application/json"}, JSON.stringify({user_categories: [user_category], meta:{total: 1}})];
// });
// });
},
afterEach: function() {
Ember.run(App, 'destroy');
// server.shutdown();
}
});

Expand Down
13 changes: 0 additions & 13 deletions tests/acceptance/meta-route-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import Ember from 'ember';
import {module, test} from 'qunit';
import startApp from '../helpers/start-app';
import Router from '../../router';
// import Pretender from 'pretender';
import MetaRoute from 'ember-cli-admin/dsl/meta-route';

var App, users, router;
Expand All @@ -15,17 +14,6 @@ module('Acceptance: Meta route Test', {
});

App = startApp();

// server = new Pretender(function () {
// this.get('/api/users', function (request) {
// users = [];
// for (var i = 0; i < 25; i++) {
// users.push({id: i, name: 'testuser'});
// }
// users[0].email = 'test@example.com';
// return [200, {"Content-Type": "application/json"}, JSON.stringify({users: users, meta: {total: 40}})];
// });
// });
},
afterEach: function () {
MetaRoute.map(Router, function() {
Expand All @@ -37,7 +25,6 @@ module('Acceptance: Meta route Test', {
});

Ember.run(App, 'destroy');
// server.shutdown();
}
});

Expand Down
21 changes: 0 additions & 21 deletions tests/acceptance/resource-actions-test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import Ember from 'ember';
import {module, test} from 'qunit';
import startApp from '../helpers/start-app';
// import Pretender from 'pretender';

var App, users, windowHistoryBack;

Expand All @@ -12,30 +11,10 @@ module('Acceptance: Resource Actions', {

server.createList('avatar', 25);
users = server.createList('user', 25);
// server = new Pretender(function() {
// this.put('/api/users/:id', function(request){
// return [200, {"Content-Type": "application/json"}, JSON.stringify({user: {id: request.params.id, email: 'test@example.com', name: 'Test User'}} )];
// });
// this.get('/api/users', function(request) {
// users = [];
// for (var i = 0; i < 25; i++) {
// users.push({id: i, name: 'testuser'});
// }
// users[0].email = 'test@example.com';
// return [200, {"Content-Type": "application/json"}, JSON.stringify({users: users, meta:{total: 40}})];
// });
// this.delete('/api/users/:id', function(request) {
// return [200, {"Content-Type": "application/json"}, JSON.stringify({})];
// });
// this.get('/api/users/:id', function(request){
// return [200, {"Content-Type": "application/json"}, JSON.stringify({user: {id: request.params.id, email: 'test@example.com', name: 'Test User'}})];
// });
// });
},
afterEach: function() {
window.history.back = windowHistoryBack;
Ember.run(App, 'destroy');
// server.shutdown();
}
});

Expand Down
20 changes: 0 additions & 20 deletions tests/acceptance/search-test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import Ember from 'ember';
import {module, test} from 'qunit';
import startApp from '../helpers/start-app';
import Pretender from 'pretender';

var App, users;

Expand All @@ -11,24 +10,9 @@ module('Acceptance: Search', {

server.createList('avatar', 25);
users = server.createList('user', 25);
// server = new Pretender(function() {
// this.get('/api/users', function(request) {
// if (request.queryParams.q) {
// users = [{id: 1, name: 'testuser'}];
// return [200, {"Content-Type": "application/json"}, JSON.stringify({users: users, meta:{total: 1}})];
// }
// users = [];
// for (var i = 0; i < 25; i++) {
// users.push({id: i, name: 'testuser'});
// }
// users[0].email = 'test@example.com';
// return [200, {"Content-Type": "application/json"}, JSON.stringify({users: users, meta:{total: 40}})];
// });
// });
},
afterEach: function() {
Ember.run(App, 'destroy');
// server.shutdown();
}
});

Expand Down Expand Up @@ -65,10 +49,6 @@ test('search input can be selectable', function(assert) {
});

test('autocomplete search', function(assert) {
server.get('api/users/autocomplete', function(request){
users = [{id: 1, name: 'testuser'}];
return [200, {"Content-Type": "application/json"}, JSON.stringify(users)];
});
visit('/users');
Ember.$('.typeahead').typeahead('val', '12');
click('button[type="submit"]');
Expand Down
8 changes: 0 additions & 8 deletions tests/acceptance/smoke-test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import Ember from 'ember';
import {module, test} from 'qunit';
import startApp from '../helpers/start-app';
// import Pretender from 'pretender';

var App;

Expand All @@ -10,16 +9,9 @@ module('Acceptance: Smoke Test', {
App = startApp();

server.createList('car', 1);
// server = new Pretender(function() {
// this.get('/api/cars', function(request) {
// var car = {id:1, title: 'TEST CAR'};
// return [200, {"Content-Type": "application/json"}, JSON.stringify({cars: [car], meta:{total: 1}})];
// });
// });
},
afterEach: function() {
Ember.run(App, 'destroy');
// server.shutdown();
}
});

Expand Down
21 changes: 0 additions & 21 deletions tests/acceptance/sorting-test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import Ember from 'ember';
import { module, test } from 'qunit';
import startApp from '../helpers/start-app';
// import Pretender from 'pretender';

var App, users;

Expand All @@ -11,29 +10,9 @@ module('Acceptance: Sorting', {

server.createList('avatar', 5);
users = server.createList('user', 5);

// server = new Pretender(function() {
// this.get('/api/users', function(request) {
// if (request.queryParams.sort === "id" && request.queryParams.orderAscending === "true") {
// users = [{id: 0, name: 'testuser'}];
// return [200, {"Content-Type": "application/json"}, JSON.stringify({users: users, meta:{total: 1}})];
// }
// if (request.queryParams.sort === "id" && request.queryParams.orderAscending !== "true") {
// users = [{id: 10, name: 'testuser'}];
// return [200, {"Content-Type": "application/json"}, JSON.stringify({users: users, meta:{total: 1}})];
// }
// if (request.queryParams.sort === "name") {
// users = [{id: 3, name: 'testuser'}];
// return [200, {"Content-Type": "application/json"}, JSON.stringify({users: users, meta:{total: 1}})];
// }
// users = [{id: 1, name: 'testuser'}];
// return [200, {"Content-Type": "application/json"}, JSON.stringify({users: users, meta:{total: 1}})];
// });
// });
},
afterEach: function() {
Ember.run(App, 'destroy');
// server.shutdown();
}
});

Expand Down
12 changes: 0 additions & 12 deletions tests/acceptance/tree-view-test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import Ember from 'ember';
import {module, test} from 'qunit';
import startApp from '../helpers/start-app';
// import Pretender from 'pretender';

var App, catalogues;

Expand All @@ -10,20 +9,9 @@ module('Acceptance: Tree View Test', {
App = startApp();

catalogues = server.createList('catalogue', 5);
// server = new Pretender(function() {
// this.get('/api/catalogues', function(request) {
// catalogues = [{id: 1, name: 'Tree #1', parent_id: null, catalogue_ids: [2,3]},
// {id: 2, name: 'Tree #2', parent_id: 1, catalogue_ids: [4]},
// {id: 3, name: 'Tree #3', parent_id: 1, catalogue_ids: [5]},
// {id: 4, name: 'Tree #4', parent_id: 2, catalogue_ids: []},
// {id: 5, name: 'Tree #5', parent_id: 3, catalogue_ids: []}];
// return [200, {"Content-Type": "application/json"}, JSON.stringify({catalogues: catalogues})];
// });
// });
},
afterEach: function() {
Ember.run(App, 'destroy');
// server.shutdown();
}
});

Expand Down

0 comments on commit 0aeef0f

Please sign in to comment.