mirror of
https://github.com/overleaf/overleaf.git
synced 2025-04-05 06:09:20 +00:00
added unit tests
This commit is contained in:
parent
4320b790bd
commit
66dcb376a4
1 changed files with 22 additions and 0 deletions
|
@ -159,6 +159,28 @@ describe "ClsiManager", ->
|
|||
}]
|
||||
)
|
||||
|
||||
|
||||
describe "when root doc override is valid", ->
|
||||
beforeEach (done) ->
|
||||
@ClsiManager._buildRequest @project_id, {rootDoc_id:"mock-doc-id-2"}, (error, request) =>
|
||||
@request = request
|
||||
done()
|
||||
|
||||
it "should change root path", ->
|
||||
@request.compile.rootResourcePath.should.equal "chapters/chapter1.tex"
|
||||
|
||||
|
||||
describe "when root doc override is invalid", ->
|
||||
beforeEach (done) ->
|
||||
@ClsiManager._buildRequest @project_id, {rootDoc_id:"invalid-id"}, (error, request) =>
|
||||
@request = request
|
||||
done()
|
||||
|
||||
it "should fallback to default root doc", ->
|
||||
@request.compile.rootResourcePath.should.equal "main.tex"
|
||||
|
||||
|
||||
|
||||
describe "when the project has an invalid compiler", ->
|
||||
beforeEach (done) ->
|
||||
@project.compiler = "context"
|
||||
|
|
Loading…
Reference in a new issue