Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

adding getFileInfo tests

  • Loading branch information...
commit b396491e0848516796b1f4924320cedfa8ebeaf3 1 parent edcd962
Mark Bogdanoff authored

Showing 1 changed file with 23 additions and 0 deletions. Show diff stats Hide diff stats

  1. +23 0 test/storage-object-test.js
23 test/storage-object-test.js
@@ -116,6 +116,29 @@ vows.describe('node-cloudfiles/storage-object').addBatch(helpers.requireAuth(cli
116 116 }
117 117 }).addBatch({
118 118 "The node-cloudfiles client": {
  119 + "the getFileInfo() method": {
  120 + "for a file that exists": {
  121 + topic: function () {
  122 + client.getFileInfo('test_container', 'file2.txt', this.callback);
  123 + },
  124 + "should return a valid StorageObject": function (err, file) {
  125 + helpers.assertFile(file);
  126 + assert.isNull(file.local);
  127 + testData.file = file;
  128 + }
  129 + }
  130 + , "for a file that does not exist": {
  131 + topic: function () {
  132 + client.getFileInfo('test_container', 'file0.txt', this.callback);
  133 + },
  134 + "should return an error": function (err, file) {
  135 + assert.ok(err instanceof Error);
  136 + }
  137 + }
  138 + }
  139 + }
  140 +}).addBatch({
  141 + "The node-cloudfiles client": {
119 142 "an instance of StorageObject": {
120 143 "the save() method": {
121 144 topic: function () {

0 comments on commit b396491

Please sign in to comment.
Something went wrong with that request. Please try again.