mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-10-30 04:32:45 +01:00
* Start adding google login * fix local js issue * implement syntax suggestions * fix delete social tests * Add service for authentication alerts * fix social login tests * make suggested google sign in changes * fix accidentally deleted code * refactor social network sign in * fix incorrect find * implement suggested google sign in changes * fix(tests): Inject fake Auth module for auth controller * fix(test): prevent social service from causing page reload * fix loading user info * Use lodash's implimentation of find for IE compatibility * chore: increase test coverage around deletion route * chore: clean up social auth test * chore: Fix social login tests * remove profile from login scope * fix(api): Allow social accounts to deregister as user has auth backup * temporarily disable google login button
87 lines
1.9 KiB
JavaScript
87 lines
1.9 KiB
JavaScript
'use strict';
|
|
|
|
describe('Footer Controller', function() {
|
|
var scope, user, User;
|
|
|
|
beforeEach(inject(function($rootScope, $controller) {
|
|
user = specHelper.newUser();
|
|
User = {
|
|
log: sandbox.stub(),
|
|
set: sandbox.stub(),
|
|
addTenGems: sandbox.stub(),
|
|
addHourglass: sandbox.stub(),
|
|
user: user
|
|
};
|
|
scope = $rootScope.$new();
|
|
$controller('FooterCtrl', {$scope: scope, User: User, Social: {}});
|
|
}));
|
|
|
|
context('Debug mode', function() {
|
|
before(function() {
|
|
window.env.NODE_ENV = 'test';
|
|
});
|
|
|
|
after(function() {
|
|
delete window.env.NODE_ENV;
|
|
});
|
|
|
|
describe('#setHealthLow', function(){
|
|
it('sets user health to 1');
|
|
});
|
|
|
|
describe('#addMissedDay', function(){
|
|
beforeEach(function() {
|
|
sandbox.stub(confirm).returns(true);
|
|
});
|
|
|
|
it('Cancels if confirm box is not confirmed');
|
|
|
|
it('allows multiple days');
|
|
|
|
it('sets users last cron');
|
|
|
|
it('notifies uers');
|
|
});
|
|
|
|
describe('#addTenGems', function() {
|
|
it('posts to /user/addTenGems', inject(function($httpBackend) {
|
|
scope.addTenGems();
|
|
|
|
expect(User.addTenGems).to.have.been.called;
|
|
}));
|
|
});
|
|
|
|
describe('#addHourglass', function() {
|
|
it('posts to /user/addHourglass', inject(function($httpBackend) {
|
|
scope.addHourglass();
|
|
|
|
expect(User.addHourglass).to.have.been.called;
|
|
}));
|
|
});
|
|
|
|
describe('#addGold', function() {
|
|
it('adds 500 gold to user');
|
|
});
|
|
|
|
describe('#addMana', function() {
|
|
it('adds 500 mana to user');
|
|
});
|
|
|
|
describe('#addLevelsAndGold', function() {
|
|
it('adds 10000 experience to user');
|
|
|
|
it('adds 10000 gp to user');
|
|
|
|
it('adds 10000 mp to user');
|
|
});
|
|
|
|
describe('#addOneLevel', function() {
|
|
it('adds one level to user');
|
|
});
|
|
|
|
describe('#addBossQuestProgressUp', function() {
|
|
it('adds 1000 progress to quest.progress.up');
|
|
});
|
|
});
|
|
});
|