-
Notifications
You must be signed in to change notification settings - Fork 927
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(test): add custom _provider and _scheme for basic fixture
- Loading branch information
Pooya Parsa
committed
Apr 2, 2018
1 parent
b7998c6
commit 7423e77
Showing
4 changed files
with
20 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = function test (scheme) { | ||
scheme._with_test_provider = true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
export default class LocalScheme { | ||
constructor (auth, options) { | ||
this.$auth = auth | ||
this.name = options._name | ||
} | ||
|
||
mounted () { | ||
// eslint-disable-next-line no-console | ||
console.log('Mounted test provider: ' + this.name) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
<template> | ||
<div> | ||
{{ $auth.$state.loggedIn ? 'Logged In' : 'Guest' }} | ||
<pre v-if="$auth.loggedIn" v-html="$auth.user"></pre> | ||
<div v-else>Please login</div> | ||
</div> | ||
</template> |