File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed
Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -33,9 +33,9 @@ class << self
3333 api_key : String ,
3434 api_secret_key : String ,
3535 api_version : String ,
36- scope : T . any ( T ::Array [ String ] , String ) ,
3736 is_private : T ::Boolean ,
3837 is_embedded : T ::Boolean ,
38+ scope : T . any ( T ::Array [ String ] , String ) ,
3939 log_level : T . any ( String , Symbol ) ,
4040 logger : T . untyped ,
4141 host_name : T . nilable ( String ) ,
@@ -51,9 +51,9 @@ def setup(
5151 api_key :,
5252 api_secret_key :,
5353 api_version :,
54- scope :,
5554 is_private :,
5655 is_embedded :,
56+ scope : [ ] ,
5757 log_level : :info ,
5858 logger : ::Logger . new ( $stdout) ,
5959 host_name : nil ,
Original file line number Diff line number Diff line change @@ -165,6 +165,19 @@ def test_send_a_warning_if_log_level_is_invalid
165165 )
166166 end
167167
168+ def test_scope_config_can_be_optional_and_defaults_to_empty
169+ ShopifyAPI ::Context . setup (
170+ api_key : "" ,
171+ api_secret_key : "" ,
172+ api_version : "2023-10" ,
173+ host_name : "" ,
174+ is_private : false ,
175+ is_embedded : true ,
176+ )
177+
178+ assert_equal ( ShopifyAPI ::Auth ::AuthScopes . new , ShopifyAPI ::Context . scope )
179+ end
180+
168181 def teardown
169182 ShopifyAPI ::Context . deactivate_session
170183 end
You can’t perform that action at this time.
0 commit comments