File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ - (NSString *)getAccess {
3737- (NSString *)getBucket : (NSDictionary *)info {
3838
3939 NSString *scope = [info objectForKey: @" scope" ];
40- if (!scope) {
40+ if (!scope || [scope isKindOfClass: [ NSNull class ]] ) {
4141 return @" " ;
4242 }
4343
Original file line number Diff line number Diff line change @@ -56,4 +56,11 @@ - (void)testReturnUrl {
5656 XCTAssert (t.hasReturnUrl , @" Pass" );
5757}
5858
59+ - (void )testScopeNull {
60+ QNUpToken *t = [QNUpToken parse: @" k4MXrVJes7RoS7N7teQDfkVqDDXqNOZq5BOfjzPn:MDllYmMxYTkyNjIxZTg0N2NjYTUwNDg0MGIyOWQxYjhjMTBlZTc0Ngo=:eyJzY29wZSI6bnVsbCwiZGVhZGxpbmUiOjE1MTM3Njg3ODl9Cg==" ];
61+ // This is an example of a functional test case.
62+ XCTAssert ([t.bucket isEqualToString: @" " ], @" Pass" );
63+ }
64+
65+
5966@end
You can’t perform that action at this time.
0 commit comments