diff options
author | John Keiser <jkeiser@opscode.com> | 2013-10-11 13:57:07 -0700 |
---|---|---|
committer | John Keiser <jkeiser@opscode.com> | 2013-10-11 13:57:07 -0700 |
commit | 12b902d5aa539f14ee2e25f1a1ca702f8fb81377 (patch) | |
tree | 6db3aef50f1f3e823cd928491796a09c40a822e0 /spec/integration | |
parent | 6d58ff931dda2d5bfa0eb8b7feadf5cd0fb37c8e (diff) | |
parent | 5e5f5b1b1e431612a40bf235c4081dc5ff885bef (diff) | |
download | chef-12b902d5aa539f14ee2e25f1a1ca702f8fb81377.tar.gz |
Use Chef::HTTP for knife-essentials raw requests, fix CHEF-4515 in the balance
Diffstat (limited to 'spec/integration')
-rw-r--r-- | spec/integration/knife/raw_spec.rb | 4 | ||||
-rw-r--r-- | spec/integration/knife/upload_spec.rb | 9 |
2 files changed, 11 insertions, 2 deletions
diff --git a/spec/integration/knife/raw_spec.rb b/spec/integration/knife/raw_spec.rb index 7ebe5476d9..b7412e4e8a 100644 --- a/spec/integration/knife/raw_spec.rb +++ b/spec/integration/knife/raw_spec.rb @@ -214,13 +214,13 @@ EOM end it 'knife raw /blah returns the raw text' do - knife('raw /blah').should_succeed <<EOM + knife('raw /blah').should_succeed(<<EOM, :stderr => "WARN: Expected JSON response, but got content-type 'text'\n") { "x": "y", "a": "b" } EOM end it 'knife raw --no-pretty /blah returns the raw text' do - knife('raw --no-pretty /blah').should_succeed <<EOM + knife('raw --no-pretty /blah').should_succeed(<<EOM, :stderr => "WARN: Expected JSON response, but got content-type 'text'\n") { "x": "y", "a": "b" } EOM end diff --git a/spec/integration/knife/upload_spec.rb b/spec/integration/knife/upload_spec.rb index 770efb2d46..46b804205f 100644 --- a/spec/integration/knife/upload_spec.rb +++ b/spec/integration/knife/upload_spec.rb @@ -1064,4 +1064,13 @@ EOM end end # with versioned cookbooks + when_the_chef_server 'has a user' do + user 'x', {} + when_the_repository 'has the same user with json_class in it' do + file 'users/x.json', { 'admin' => true, 'json_class' => 'Chef::WebUIUser' } + it 'knife upload /users/x.json succeeds' do + knife('upload /users/x.json').should_succeed "Updated /users/x.json\n" + end + end + end end |