File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -136,7 +136,7 @@ def validate_credentials!
136136
137137 def validate_api_version!
138138 error = MisconfiguredClientError . new ( "api_version must be either nil or a valid API version" )
139- fail error if ( @api_version && Gem ::Version . new ( @api_version ) < Gem ::Version . new ( '1.0' ) )
139+ fail error if ( @api_version && @api_version != 'Unstable' && Gem ::Version . new ( @api_version ) < Gem ::Version . new ( '1.0' ) )
140140 end
141141
142142 def execute_request ( request )
Original file line number Diff line number Diff line change @@ -66,6 +66,10 @@ module Intercom
6666 assert_nil ( Client . new ( app_id : app_id , api_key : api_key , api_version : nil ) . api_version )
6767 end
6868
69+ it 'allows api version to be Unstable' do
70+ Client . new ( app_id : app_id , api_key : api_key , api_version : 'Unstable' ) . api_version . must_equal ( 'Unstable' )
71+ end
72+
6973 it 'raises on invalid api version' do
7074 proc { Client . new ( app_id : app_id , api_key : api_key , api_version : '0.2' ) } . must_raise MisconfiguredClientError
7175 end
You can’t perform that action at this time.
0 commit comments