@@ -20,7 +20,7 @@ test.cb.serial('throw error if plugin gets registered twice', (t) => {
20
20
} )
21
21
22
22
test . cb . serial ( 'authentication does succeed' , ( t ) => {
23
- prototypes . stub ( 'validateAccessToken' , fixtures . validation )
23
+ prototypes . stub ( 'validateAccessToken' , fixtures . content . userData )
24
24
25
25
getServer ( undefined , ( server ) => {
26
26
server . inject ( {
@@ -38,7 +38,7 @@ test.cb.serial('authentication does succeed', (t) => {
38
38
} )
39
39
40
40
test . cb . serial ( 'authentication does succeed – cached' , ( t ) => {
41
- prototypes . stub ( 'validateAccessToken' , fixtures . validation )
41
+ prototypes . stub ( 'validateAccessToken' , fixtures . content . userData )
42
42
43
43
const mockReq = {
44
44
method : 'GET' ,
@@ -49,7 +49,7 @@ test.cb.serial('authentication does succeed – cached', (t) => {
49
49
}
50
50
51
51
getServer ( {
52
- client : fixtures . config ,
52
+ client : fixtures . clientConfig ,
53
53
cache : { }
54
54
} , ( server ) => {
55
55
server . inject ( mockReq , ( ) => {
@@ -63,7 +63,7 @@ test.cb.serial('authentication does succeed – cached', (t) => {
63
63
} )
64
64
65
65
test . cb . serial ( 'authentication does success – valid roles' , ( t ) => {
66
- prototypes . stub ( 'validateAccessToken' , fixtures . validation )
66
+ prototypes . stub ( 'validateAccessToken' , fixtures . content . userData )
67
67
68
68
getServer ( undefined , ( server ) => {
69
69
server . inject ( {
@@ -81,7 +81,7 @@ test.cb.serial('authentication does success – valid roles', (t) => {
81
81
} )
82
82
83
83
test . cb . serial ( 'authentication does fail – invalid roles' , ( t ) => {
84
- prototypes . stub ( 'validateAccessToken' , fixtures . validation )
84
+ prototypes . stub ( 'validateAccessToken' , fixtures . content . userData )
85
85
86
86
getServer ( undefined , ( server ) => {
87
87
server . inject ( {
@@ -123,7 +123,7 @@ test.cb.serial('authentication does fail – invalid header', (t) => {
123
123
method : 'GET' ,
124
124
url : '/' ,
125
125
headers : {
126
- authorization : fixtures . token
126
+ authorization : fixtures . common . token
127
127
}
128
128
} , ( res ) => {
129
129
t . truthy ( res )
@@ -135,7 +135,7 @@ test.cb.serial('authentication does fail – invalid header', (t) => {
135
135
} )
136
136
137
137
test . cb . serial ( 'server method validates token' , ( t ) => {
138
- prototypes . stub ( 'validateAccessToken' , fixtures . validation )
138
+ prototypes . stub ( 'validateAccessToken' , fixtures . content . userData )
139
139
140
140
getServer ( undefined , ( server ) => {
141
141
server . kjwt . validate ( `bearer ${ fixtures . jwt . userData } ` , ( err , res ) => {
0 commit comments