File tree Expand file tree Collapse file tree 2 files changed +12
-9
lines changed Expand file tree Collapse file tree 2 files changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -79,8 +79,18 @@ class PolicyManager extends ChangeNotifier {
79
79
operation: 'policy_manager_initialize' ,
80
80
);
81
81
82
+ final policyMap = jsonPolicies.map (
83
+ (key, value) => MapEntry (
84
+ key,
85
+ Policy (
86
+ roleName: key,
87
+ allowedContent: value as List <String >,
88
+ ).toJson (),
89
+ ),
90
+ );
91
+
82
92
_policies = JsonHandler .parseMap (
83
- jsonPolicies ,
93
+ policyMap ,
84
94
(json) => Policy .fromJson (json),
85
95
context: 'policy_manager' ,
86
96
allowPartialSuccess:
Original file line number Diff line number Diff line change @@ -2,11 +2,4 @@ import 'package:flutter_test/flutter_test.dart';
2
2
3
3
import 'package:flutter_policy_engine/flutter_policy_engine.dart' ;
4
4
5
- void main () {
6
- test ('adds one to input values' , () {
7
- final calculator = Calculator ();
8
- expect (calculator.addOne (2 ), 3 );
9
- expect (calculator.addOne (- 7 ), - 6 );
10
- expect (calculator.addOne (0 ), 1 );
11
- });
12
- }
5
+ void main () {}
You can’t perform that action at this time.
0 commit comments