diff options
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 |