Skip to content

Instantly share code, notes, and snippets.

test("Check editing of a book updates search results", function() {
expect(7);
visit("/").then(function() {
return click("#searchButton"); //Click the search button
}).then(function() {
throws(
function() {
find(".searchResult h2:contains('The Great Modification')") ;
App = Ember,Application.create({
currentPath: ''
});
ApplicationController : Ember.Controller.extend({
currentPathDidChange: function() {
App.set('currentPath', this.get('currentPath'));
}.observes('currentPath')
});
App.get('currentPath');
describe "mocked query of web service" do
it "should perform correct action on system data based on mocked response" do
RestClient = double
file = File.open('RELATIVE_FILE_PATH_HERE', 'r') #Relative to root of Rails app
data = file.read
file.close
response = double
response.stub(:code) { 200 }
response.stub(:body) { data }
functionThatReturnsPromise.then(function() {
console.log('about to do some logic');
this.get('controllers.application.currentUser').reload();
console.log('Why won\'t my code get to this point????');
});
Ember.RSVP.configure('onerror', function(e) {
console.log(e.message);
console.log(e.stack);
});
this.resource('contract', {path: '/contract'}, function() {
this.route('edit', {path: ':contract_id/edit'});
this.route('show', {path: ':contract_id'});
});
info: Welcome to Nodejitsu contractvault
info: jitsu v0.13.2, node v0.10.17
info: It worked if it ends with Nodejitsu ok
info: Executing command deploy
info: Analyzing application dependencies in node server/server.js
info: Checking app availability contractvault
info: Creating app contractvault
info: Creating snapshot 0.0.0-16
info Uploading: [=============================] 100%
error: Error running command deploy
Ian:cvEAK ian$ cat package.json
{
"name": "contractvault",
"namespace": "contractvault",
"version": "0.0.0-16",
"main": "server/server.js",
"directories": {
"doc": "doc",
"test": "test"
},
@ianpetzer
ianpetzer / gist:7004202
Created October 16, 2013 07:59
Description of how to retrieve the WPF Url for Peach Payments using Node.js
var request = require('request');
exports.getPaymentUrl = function(data, callback) {
//You will need to supply values for these first four values
var params = {
'SECURITY.SENDER': 'xxxx',
'USER.LOGIN': 'xxxx',
'USER.PWD': 'xxxx',
'TRANSACTION.CHANNEL': 'xxxxx',