mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
Use new newUser specHelper syntax
This commit is contained in:
@@ -6,7 +6,6 @@ describe('Challenges Controller', function() {
|
|||||||
beforeEach(function() {
|
beforeEach(function() {
|
||||||
module(function($provide) {
|
module(function($provide) {
|
||||||
user = specHelper.newUser();
|
user = specHelper.newUser();
|
||||||
user._id = "unique-user-id";
|
|
||||||
User = {
|
User = {
|
||||||
getBalanceInGems: sandbox.stub(),
|
getBalanceInGems: sandbox.stub(),
|
||||||
sync: sandbox.stub(),
|
sync: sandbox.stub(),
|
||||||
@@ -16,9 +15,6 @@ describe('Challenges Controller', function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
inject(function($rootScope, $controller, _$state_, _Groups_, _Members_, _Notification_){
|
inject(function($rootScope, $controller, _$state_, _Groups_, _Members_, _Notification_){
|
||||||
user = specHelper.newUser();
|
|
||||||
user._id = "unique-user-id";
|
|
||||||
|
|
||||||
scope = $rootScope.$new();
|
scope = $rootScope.$new();
|
||||||
rootScope = $rootScope;
|
rootScope = $rootScope;
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ describe('Hall of Heroes Controller', function() {
|
|||||||
|
|
||||||
inject(function($rootScope, $controller){
|
inject(function($rootScope, $controller){
|
||||||
user = specHelper.newUser();
|
user = specHelper.newUser();
|
||||||
user._id = "unique-user-id"
|
|
||||||
|
|
||||||
scope = $rootScope.$new();
|
scope = $rootScope.$new();
|
||||||
|
|
||||||
|
|||||||
@@ -9,13 +9,17 @@ describe('Inventory Controller', function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
inject(function($rootScope, $controller, Shared){
|
inject(function($rootScope, $controller, Shared){
|
||||||
user = specHelper.newUser();
|
user = specHelper.newUser({
|
||||||
user.balance = 4;
|
balance: 4,
|
||||||
user.items.eggs = {Cactus: 1};
|
items: {
|
||||||
user.items.hatchingPotions = {Base: 1};
|
eggs: { Cactus: 1 },
|
||||||
user.items.food = {Meat: 1};
|
hatchingPotions: { Base: 1 },
|
||||||
user.items.pets = {}
|
food: { Meat: 1 },
|
||||||
user.items.mounts = {};
|
pets: {},
|
||||||
|
mounts: {}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
Shared.wrap(user);
|
Shared.wrap(user);
|
||||||
var mockWindow = {
|
var mockWindow = {
|
||||||
confirm: function(msg){
|
confirm: function(msg){
|
||||||
|
|||||||
@@ -6,9 +6,10 @@ describe('Analytics Service', function () {
|
|||||||
beforeEach(function() {
|
beforeEach(function() {
|
||||||
clock = sandbox.useFakeTimers();
|
clock = sandbox.useFakeTimers();
|
||||||
sandbox.stub(window, 'refresher', function(){return true});
|
sandbox.stub(window, 'refresher', function(){return true});
|
||||||
user = specHelper.newUser();
|
user = specHelper.newUser({
|
||||||
user.contributor = {};
|
contributor: {},
|
||||||
user.purchased = { plan: {} };
|
purchased: { plan: {} },
|
||||||
|
});
|
||||||
user.flags.tour = { intro: null };
|
user.flags.tour = { intro: null };
|
||||||
|
|
||||||
module(function($provide) {
|
module(function($provide) {
|
||||||
|
|||||||
Reference in New Issue
Block a user