-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merged change fb246415-a7a1-4e85-8b1a-702a623769ba
From review branch _reviews/master/mjohno-master/3 into master Signed-off-by: mcquinc <claire@chef.io> Reviewed-by: afiunes <afiunes@getchef.com> Reviewed-by: duffieldt <tom@getchef.com> Reviewed-by: jmink <jmink@getchef.com> Reviewed-by: mcquinc <claire@chef.io>
- Loading branch information
Showing
6 changed files
with
75 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
require 'spec_helper' | ||
|
||
describe DeliveryTruck::Helpers::Deploy do | ||
let(:node) { Chef::Node.new } | ||
|
||
describe '.deployment_search_query' do | ||
context 'when config value is unset' do | ||
it 'returns default search query' do | ||
expect(described_class.deployment_search_query(node)).to eql('recipes:*push-jobs*') | ||
end | ||
end | ||
|
||
context 'when config value is set' do | ||
let(:custom_search){ 'cool:attributes OR awful:constraints' } | ||
it 'returns the custom search query' do | ||
node.default['delivery']['config']['delivery-truck']['deploy']['search'] = custom_search | ||
expect(described_class.deployment_search_query(node)).to eql(custom_search) | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters