Permalink
Browse files

added tests for column names and coverage reports

  • Loading branch information...
1 parent 1f440d6 commit f2e8cbf1ee3e9e77af4932cc082085371b5b65ed @devdazed devdazed committed Jan 17, 2012

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -1577,7 +1577,7 @@ <h2 class='stats'>
<p id='t338' class='stm run'>&nbsp;&nbsp;if(options.gzip&nbsp;===&nbsp;true){<span class='strut'>&nbsp;</span></p>
- <p id='t339' class='stm run'>&nbsp;&nbsp;&nbsp;&nbsp;zlib.deflateRaw(cql,&nbsp;function(err,&nbsp;cqlz){<span class='strut'>&nbsp;</span></p>
+ <p id='t339' class='stm run'>&nbsp;&nbsp;&nbsp;&nbsp;zlib.deflate(cql,&nbsp;function(err,&nbsp;cqlz){<span class='strut'>&nbsp;</span></p>
<p id='t340' class='stm run'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;self.execute('execute_cql_query',&nbsp;cqlz,&nbsp;ttype.Compression.GZIP,&nbsp;onReturn);<span class='strut'>&nbsp;</span></p>
View
@@ -17,7 +17,7 @@
<div id='header'>
<div class='content'>
<h1>Coverage report:
- <span class='pc_cov'>91.11%</span>
+ <span class='pc_cov'>91.16%</span>
</h1>
<img id='keyboard_icon' src='keybd_closed.png'>
</div>
@@ -53,10 +53,10 @@ <h1>Coverage report:
<tfoot>
<tr class='total'>
<td class='name left'>Total</td>
- <td>564</td>
+ <td>567</td>
<td>55</td>
- <td class='right'>91.11%</td>
+ <td class='right'>91.16%</td>
</tr>
</tfoot>
<tbody>
@@ -143,7 +143,7 @@ <h1>Coverage report:
<tr class='file'>
<td class='name left'><a href='column_family.html'>column_family.js</a></td>
- <td>59</td>
+ <td>62</td>
<td>0</td>
<td class='right'>100.00%</td>
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -493,7 +493,7 @@ <h2 class='stats'>
<p id='t42' class='stm run'>Serializers.encodeBinary&nbsp;=&nbsp;function(val){<span class='strut'>&nbsp;</span></p>
- <p id='t43' class='stm run'>&nbsp;&nbsp;return&nbsp;new&nbsp;Buffer(val,&nbsp;'binary');<span class='strut'>&nbsp;</span></p>
+ <p id='t43' class='stm run'>&nbsp;&nbsp;return&nbsp;new&nbsp;Buffer(val.toString(),&nbsp;'binary');<span class='strut'>&nbsp;</span></p>
<p id='t44' class='pln'>};<span class='strut'>&nbsp;</span></p>
@@ -573,7 +573,7 @@ <h2 class='stats'>
<p id='t82' class='stm run'>Serializers.encodeUTF8&nbsp;=&nbsp;function(val){<span class='strut'>&nbsp;</span></p>
- <p id='t83' class='stm run'>&nbsp;&nbsp;return&nbsp;new&nbsp;Buffer(val,&nbsp;'utf8');<span class='strut'>&nbsp;</span></p>
+ <p id='t83' class='stm run'>&nbsp;&nbsp;return&nbsp;new&nbsp;Buffer(val.toString(),&nbsp;'utf8');<span class='strut'>&nbsp;</span></p>
<p id='t84' class='pln'>};<span class='strut'>&nbsp;</span></p>
@@ -593,7 +593,7 @@ <h2 class='stats'>
<p id='t92' class='stm run'>Serializers.encodeAscii&nbsp;=&nbsp;function(val){<span class='strut'>&nbsp;</span></p>
- <p id='t93' class='stm run'>&nbsp;&nbsp;return&nbsp;new&nbsp;Buffer(val,&nbsp;'ascii');<span class='strut'>&nbsp;</span></p>
+ <p id='t93' class='stm run'>&nbsp;&nbsp;return&nbsp;new&nbsp;Buffer(val.toString(),&nbsp;'ascii');<span class='strut'>&nbsp;</span></p>
<p id='t94' class='pln'>};<span class='strut'>&nbsp;</span></p>
View
@@ -41,6 +41,9 @@
"max" : 1,
"reversed" : true
},
+ "standard_get_names_options" : {
+ "columns" : ["one","three"]
+ },
"standard_get_options_error" : {
"start" : "a",
"end" : "z",
View
@@ -153,6 +153,18 @@ module.exports = {
});
},
+ 'test standard cf.get with columns names':function(test, assert){
+ cf_standard.get(config.standard_row_key, config.standard_get_names_options, function(err, row){
+ assert.ifError(err);
+ assert.ok(row instanceof Helenus.Row);
+ assert.ok(row.count === 2);
+ assert.ok(row.key === config.standard_row_key);
+ assert.ok(row.get('one').value === 'a');
+ assert.ok(row.get('three').value === 'c');
+ test.finish();
+ });
+ },
+
'test standard cf.get with error':function(test, assert){
cf_standard.get(config.standard_row_key, config.standard_get_options_error, function(err, row){
assert.ok(err instanceof Error);

0 comments on commit f2e8cbf

Please sign in to comment.