spec/nsicloudooo_spec.rb in nsicloudooo-0.2.6 vs spec/nsicloudooo_spec.rb in nsicloudooo-0.2.7

- old
+ new

@@ -18,9 +18,15 @@ it "can send a document to be granulated by a cloudooo node" do response = @nsicloudooo.granulate(:file => 'document', :filename => 'test.odt') response.should_not be_nil response["doc_key"].should == "key for document test.odt" end + + it "should throw error if any required parameter is missing" do + expect { @nsicloudooo.granulate(:file => 'document') }.to raise_error(NSICloudooo::Errors::Client::MissingParametersError) + expect { @nsicloudooo.granulate(:sam_uid => 'document') }.to raise_error(NSICloudooo::Errors::Client::MissingParametersError) + expect { @nsicloudooo.granulate(:filename => 'document') }.to raise_error(NSICloudooo::Errors::Client::MissingParametersError) + end end context "granulation with conversion" do it "can send document in a closed format to be granulated by a cloudooo node" do response = @nsicloudooo.granulate(:file => 'document', :filename => 'test.doc')