Skip to content

Commit 7e06e56

Browse files
authored
Merge pull request #72 from FullstackAcademy/fix-sessions
Complete removal of id from Session service
2 parents 4b0ce23 + fc34d8c commit 7e06e56

File tree

2 files changed

+7
-12
lines changed

2 files changed

+7
-12
lines changed

generated/browser/js/fsa/fsa-pre-built.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@
117117

118118
this.user = null;
119119

120-
this.create = function (sessionId, user) {
120+
this.create = function (user) {
121121
this.user = user;
122122
};
123123

generated/tests/browser/fsa-prebuilt/session-test.js

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,35 +18,30 @@ describe('Session Service', function () {
1818
expect(Session).to.be.an('object');
1919
});
2020

21-
it('should by default have id and user as null', function () {
21+
it('should by default have user as null', function () {
2222
expect(Session.user).to.be.equal(null);
23-
expect(Session.id).to.be.equal(null);
2423
});
2524

2625
describe('create method', function () {
2726

28-
it('should when called with id and user arguments' +
29-
'set the id and user to session', function () {
30-
var id = 'testId';
27+
it('should when called with a user argument' +
28+
'set the user to session', function () {
3129
var user = {};
32-
Session.create(id, user);
30+
Session.create(user);
3331
expect(Session.user).to.be.equal(user);
34-
expect(Session.id).to.be.equal(id);
3532
});
3633

3734
});
3835

3936
describe('destroy method', function () {
4037

41-
it('should set user and id to null', function () {
38+
it('should set user to null', function () {
4239

4340
Session.user = {};
44-
Session.id = 1;
4541

4642
Session.destroy();
4743

4844
expect(Session.user).to.be.equal(null);
49-
expect(Session.id).to.be.equal(null);
5045

5146
});
5247

@@ -78,4 +73,4 @@ describe('Session Service', function () {
7873

7974
});
8075

81-
});
76+
});

0 commit comments

Comments
 (0)