diff --git a/app/models/user.js b/app/models/user.js
index 67efa88..ae851d0 100644
--- a/app/models/user.js
+++ b/app/models/user.js
@@ -2,6 +2,7 @@ import DS from 'ember-data';
export default DS.Model.extend({
email : DS.attr('string'),
+ password : DS.attr('string'),
name : DS.attr('string'),
role : DS.attr('string'),
createdAt: DS.attr('date'),
diff --git a/app/pods/application/template.hbs b/app/pods/application/template.hbs
index 729e634..ebf45d8 100644
--- a/app/pods/application/template.hbs
+++ b/app/pods/application/template.hbs
@@ -29,9 +29,9 @@
{{else}}
{{/if}}
diff --git a/app/pods/users/route.js b/app/pods/users/index/route.js
similarity index 100%
rename from app/pods/users/route.js
rename to app/pods/users/index/route.js
diff --git a/app/pods/users/template.hbs b/app/pods/users/index/template.hbs
similarity index 100%
rename from app/pods/users/template.hbs
rename to app/pods/users/index/template.hbs
diff --git a/app/pods/users/new/new-user-form/component.js b/app/pods/users/new/new-user-form/component.js
new file mode 100644
index 0000000..6f3629a
--- /dev/null
+++ b/app/pods/users/new/new-user-form/component.js
@@ -0,0 +1,16 @@
+import Ember from 'ember';
+
+export default Ember.Component.extend({
+ classNames: ['grid-1'],
+ passwordConfirm: null,
+
+ actions: {
+ save: function() {
+ var user = this.get('user');
+
+ if (user.get('isDirty')) {
+ user.save();
+ }
+ },
+ },
+});
diff --git a/app/pods/users/new/new-user-form/template.hbs b/app/pods/users/new/new-user-form/template.hbs
new file mode 100644
index 0000000..d4d2958
--- /dev/null
+++ b/app/pods/users/new/new-user-form/template.hbs
@@ -0,0 +1,30 @@
+
+
+
diff --git a/app/pods/users/new/route.js b/app/pods/users/new/route.js
new file mode 100644
index 0000000..5e18e0d
--- /dev/null
+++ b/app/pods/users/new/route.js
@@ -0,0 +1,14 @@
+import Ember from 'ember';
+import UnauthenticatedRouteMixin from 'simple-auth/mixins/unauthenticated-route-mixin';
+
+export default Ember.Route.extend(UnauthenticatedRouteMixin, {
+ model: function() {
+ return Ember.RSVP.hash({
+ user: this.store.createRecord('user'),
+ });
+ },
+
+ setupController: function(controller, model) {
+ controller.setProperties(model);
+ },
+});
diff --git a/app/pods/users/new/template.hbs b/app/pods/users/new/template.hbs
new file mode 100644
index 0000000..abf9f72
--- /dev/null
+++ b/app/pods/users/new/template.hbs
@@ -0,0 +1 @@
+{{users/new/new-user-form user=user}}
diff --git a/app/router.js b/app/router.js
index 03f3b68..5f40894 100644
--- a/app/router.js
+++ b/app/router.js
@@ -9,7 +9,6 @@ Router.map(function() {
this.route('login');
this.route('about');
this.route('characteristics');
- this.route('users');
this.route('measurements');
this.route('compare');
@@ -21,6 +20,9 @@ Router.map(function() {
this.route('new');
this.route('show', { path: ':strain_id' });
});
+ this.route('users', function() {
+ this.route('new');
+ });
});
export default Router;
diff --git a/server/mocks/authenticate.js b/server/mocks/authenticate.js
index 0a6a8b8..4ec4913 100644
--- a/server/mocks/authenticate.js
+++ b/server/mocks/authenticate.js
@@ -35,7 +35,7 @@ module.exports = function(app) {
authenticateRouter.post('/', function(req, res) {
// wait for a bit to simulate cold boot of heroku api
- var ms = 3000 + new Date().getTime();
+ var ms = 1000 + new Date().getTime();
while (new Date() < ms){}
if ((req.body.email === 'testA' || req.body.email === 'testR' || req.body.email === 'testW' )
diff --git a/tests/unit/pods/users/new/route-test.js b/tests/unit/pods/users/new/route-test.js
new file mode 100644
index 0000000..fe4901b
--- /dev/null
+++ b/tests/unit/pods/users/new/route-test.js
@@ -0,0 +1,11 @@
+import { moduleFor, test } from 'ember-qunit';
+
+moduleFor('route:users/new', 'Unit | Route | users/new', {
+ // Specify the other units that are required for this test.
+ // needs: ['controller:foo']
+});
+
+test('it exists', function(assert) {
+ var route = this.subject();
+ assert.ok(route);
+});