Skip to content

Commit

Permalink
Add test cases for passing nil to keyword parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
AliSoftware committed Oct 19, 2023
1 parent 919ba4f commit 944909f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions fastlane/spec/runner_spec.rb
Expand Up @@ -110,6 +110,16 @@ def keywords_list(list)
result = @ff.runner.execute(:lane_kw_params, :ios, { version: "12.3", interactive: true, name: 'test' })
expect(result).to eq('name: "test"; version: "12.3"; interactive: true')
end

it 'allows a required parameter to receive a nil value' do
result = @ff.runner.execute(:lane_kw_params, :ios, { name: nil, version: "12.3", interactive: true })
expect(result).to eq('name: nil; version: "12.3"; interactive: true')
end

it 'allows a default value to be overridden with a nil value' do
result = @ff.runner.execute(:lane_kw_params, :ios, { name: 'test', version: "12.3", interactive: nil })
expect(result).to eq('name: "test"; version: "12.3"; interactive: nil')
end
end
end
end
Expand Down

0 comments on commit 944909f

Please sign in to comment.