Skip to content

Commit

Permalink
Updates after tests
Browse files Browse the repository at this point in the history
  • Loading branch information
TomaszKasowicz committed Jun 8, 2017
1 parent 3bfe9b5 commit 87428f4
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 42 deletions.
82 changes: 42 additions & 40 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ const UserName = process.env.PRASO_USER;
const Password = process.env.PRASO_PASS;
const Path = '/prasocam.jpg';
const port = process.env.PORT || 5000;
const Prasocam = './images/prasocam.jpg';
const Prasocam_Def = './images/prasocam_default.jpg';

function validatePutRequest(req) {
if (!req.headers) {
Expand Down Expand Up @@ -67,6 +69,7 @@ function put(req, res, next) {
}

function Main() {
//let logger = require('bunyan').createLogger();
let server = restify.createServer({ name : 'PrasoCam' });

server.use(restify.authorizationParser());
Expand All @@ -75,7 +78,6 @@ function Main() {
server.get(Path, restify.serveStatic({
directory: './images',
file : 'prasocam.jpg',
default : 'prasocam_default.jpg',
maxAge: 12000
}));

Expand Down
1 change: 0 additions & 1 deletion test/index_ut.js
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,6 @@ describe('Index JS Unit Tests', function() {
sinon.assert.calledWith(serveStaticSpy, {
directory: './images',
file : 'prasocam.jpg',
default : 'prasocam_default.jpg',
maxAge: 12000
});
sinon.assert.calledOnce(serverMock.put);
Expand Down

0 comments on commit 87428f4

Please sign in to comment.