Skip to content

Commit

Permalink
building more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
myf committed Sep 4, 2012
1 parent e29b65e commit 40ff1a8
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 3 deletions.
1 change: 0 additions & 1 deletion bamboo-client/client/client.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,6 @@ if root.Meteor.is_client
#########GRAPH###############################
root.Template.graph.events =
"click .deletionBtn": ->
console.log "hello"
url = Session.get("currentDatasetURL")
user = Session.get("currentUser")
field = this.field
Expand Down
2 changes: 1 addition & 1 deletion bamboo-client/client/spec/ArraySpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ describe("Array FAIL Spec", function() {
//demonstrates use of expected exceptions
describe("#indexOf", function() {
it("should find 1 in [2,2,3]", function() {
expect([2,2,3].indexOf(1)).toEqual(0);
expect([2,2,3].indexOf(3)).toEqual(2);
});
});

Expand Down
35 changes: 35 additions & 0 deletions bamboo-client/client/spec/meteortesst.coffee
Original file line number Diff line number Diff line change
@@ -1,8 +1,43 @@
load_test=->
testing_url = "https://www.dropbox.com/s/0m8smn04oti92gr/sample_dataset_school_survey.csv?dl=1"
describe "register URL", ->
#SESSION############################
Session.set "currentDatasetURL", "https://www.dropbox.com/s/0m8smn04oti92gr/sample_dataset_school_survey.csv?dl=1"

#TEST###############################
describe "url", ->
it "should find url after registeration", ->
url = Session.get "currentDatasetURL"
expect(url).toEqual("https://www.dropbox.com/s/0m8smn04oti92gr/sample_dataset_school_survey.csv?dl=1")
it "should find Preparing block", ->
h1 = $("h1")
expect(h1.text()).toEqual("Preparing your dataset, just a split second..")

#SESSION######################################
Meteor.call('register_dataset', testing_url, (error, result)->
if error
alert error.reason
interval = setInterval(->
if Schemas.findOne(datasetURL: testing_url)
console.log "booya"
Meteor.call("get_fields", testing_url)
##testing####################
describe "database registration", ->
it "should have a dataset object", ->
dataset = Datasets.findOne()
expect(dataset.url).toEqual(testing_url)
it "should have a schema object", ->
schema = Schemas.findOne()
expect(schema.datasetURL).toEqual(testing_url)

describe "getting fields", ->
it "should have all the fields", ->
fileds = Session.get("fields")
expect(fields).toEqual(["grade","sex","name","income"])



clearInterval(interval)
,300)
)

2 changes: 1 addition & 1 deletion bamboo-client/server/server.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ require = __meteor_bootstrap__.require
request = require 'request'
#bambooURL = 'http://localhost:8080'
#bambooURL = 'http://bamboo.modilabs.org/'
bambooURL = 'http://dev.bamboo.io/'
bambooURL = 'http://dev.bamboo.io'
#bambooURL = 'http://starscream.modilabs.org:8080/'
datasetsURL = bambooURL + '/datasets'
summaryURLf = (id,group) -> datasetsURL + '/' + id + '/summary' +
Expand Down

0 comments on commit 40ff1a8

Please sign in to comment.