How to unit-test canActivate guard method of angular2 using Jasmine?

since no one answered my question, so I’m pasting my code snippet for the reference to help people who might get this situation. sampleLoggedIn.guard.ts import {Injectable} from ‘@angular/core’; import {Router, CanActivate} from ‘@angular/router’; import {StorageService} from ‘../storage.service’; @Injectable() export class LoggedInGuard implements CanActivate { constructor(private router: Router, private storageService: StorageService) { } /**Overriding canActivate to … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)