Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions common.blocks/app/controllers/Poems.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ Poems._getLinesFromPoem = function(poemText) {
* Получить стихотворение из БД по id
*
* @param pModel
* @param authorModel
* @param poemId
* @returns {*}
*/
Expand Down
4 changes: 2 additions & 2 deletions common.blocks/i-jquery/__ui/i-jquery__ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
"a" === nodeName ?
element.href || isTabIndexNotNaN :
isTabIndexNotNaN) &&
// the element and all of its ancestors must be visible
// the element and all of its ancestors must be visible
visible( element );
}

Expand Down Expand Up @@ -2160,4 +2160,4 @@



}));
}));
1 change: 1 addition & 0 deletions test/unit/controllers/Authors.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ models(function (err, db) {

});


});

});
Expand Down
22 changes: 22 additions & 0 deletions test/unit/controllers/Poems.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,28 @@ models(function (err, db) {

});

it('should find poem by _id', function () {
var deferred = vow.defer(),
uId = 'b12345678902';

Authors.create(aModel, 'a12345678901', uId).then(a => {
Poems.create(pModel, 'name', a._id, uId, 'текст стихотворения\n<Br>состоящий из нескольких строк ;":№%')
.then(function (data) {
Poems.getById(pModel, aModel, data._id)
.then(function (poem) {
deferred.resolve(poem.poem);
}, function (e) {
deferred.reject('Could not retrieve Poem from db (by id)');
});
});
});

return assert.eventually.ok(
deferred.promise(),
'Should be not empty'
);
});

});

});
Expand Down