From 3d04ffdc992f175ff083a5d1b77fe58ad6682147 Mon Sep 17 00:00:00 2001 From: sohilpandya Date: Fri, 8 Jan 2016 17:06:52 +0000 Subject: [PATCH] #44 #50 #7 #3 #9 added prompt when selecting delete button, also MULTIPLE FILTERING is now working only in backend, not showing results in frontend. --- .DS_Store | Bin 0 -> 6148 bytes hello.js | 6 ++++ lib/companyredis.js | 4 ++- lib/deletedata.js | 8 +++-- lib/index.js | 12 +++++-- lib/redis.js | 6 ++++ lib/societydashboard.js | 13 +++---- lib/societydashboardsearch.js | 51 +++++++++++++++++++++++++++ lib/societyredis.js | 19 +++++----- test/server.test.js | 51 +++++++++++++++++++++++++-- views/societydashboard.html | 63 +++++++++++++++++++++++++++++++++- 11 files changed, 208 insertions(+), 25 deletions(-) create mode 100644 .DS_Store create mode 100644 hello.js create mode 100644 lib/redis.js create mode 100644 lib/societydashboardsearch.js diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..5008ddfcf53c02e82d7eee2e57c38e5672ef89f6 GIT binary patch literal 6148 zcmeH~Jr2S!425mzP>H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0'; var start = require('../lib/start.js'); var server = require('../lib/index.js'); +var client = require('../lib/redis.js'); + test(file + " GET / returns status 200", function(t) { var options = { @@ -25,12 +33,13 @@ test(file + " GET / returns status 200", function(t) { setTimeout(function(){ server.stop(t.end); },700); - redisClient.end(); + //client.quit(); + }); }); -test(file + " GET / returns status 200", function(t) { +test.only(file + " GET / returns status 200", function(t) { var options = { method : "GET", url : "/societydashboard" @@ -42,5 +51,41 @@ test(file + " GET / returns status 200", function(t) { server.stop(t.end); },700); + //client.quit(); + }); +}); + + +test(file + " GET / returns status 200", function(t) { + var options = { + method : "GET", + url : "/societyredis" + }; + server.inject(options, function (res) { + t.equal(res.statusCode, 404, 'server loads ok'); + + setTimeout(function(){ + server.stop(t.end); + },700); + client.quit(); + }); }); + +// test(file + " POST / returns status 200", function(t) { +// var options = { +// method : "POST", +// url : "/societydashboardsearch" +// }; +// server.inject(options, function (res) { +// t.equal(res.statusCode, 200, 'server loads ok'); +// +// setTimeout(function(){ +// server.stop(t.end); +// },700); +// +// client.quit(); +// +// }); +// +// }); diff --git a/views/societydashboard.html b/views/societydashboard.html index 86dee9b..1db5b0c 100644 --- a/views/societydashboard.html +++ b/views/societydashboard.html @@ -1,6 +1,66 @@

Society dashboard

+
+ + + + +
+ + +
+ + +
+ + +
+ + + +
+ + + + + @@ -29,7 +89,8 @@

Society dashboard

- + {{/each}}
ID {{this.phone}} {{this.aboutus}} {{this.societyLogo}}