Skip to content

Commit

Permalink
Merge pull request #7 from juliemar/profile-test
Browse files Browse the repository at this point in the history
profile test
  • Loading branch information
juliemar authored Mar 27, 2019
2 parents 78915b6 + 464a323 commit 6b18e6f
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions test/public/profile.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
require('mock-local-storage')
const assert = require('assert');
const expect = require('chai').expect
const request = require('supertest');
var MatrixProfile = require('../../public/profile');



describe('Basic profile credential Test', function () {
it('should return empty of credentials is not present', function () {

var matrixProfile = new MatrixProfile();
assert.equal(matrixProfile.loadStoredProfile(), null);
});

it('should return data of credentials is present', function () {

var profileData = {
id: '111',
name: 'Nome do fulano',
imageUrl: 'http://localhost/img.jpg',
email: 'Mail@mail.com'
};

var matrixProfile = new MatrixProfile();
matrixProfile.storeProfileData(profileData);
assert.equal(matrixProfile.loadStoredProfile().name, profileData.name);
});
});

0 comments on commit 6b18e6f

Please sign in to comment.