Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add config for work_file_required, fixes #1715
- Loading branch information
1 parent
51674b0
commit fbdd73f
Showing
7 changed files
with
49 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
describe("UploadedFiles", function() { | ||
var control = require('sufia/save_work/uploaded_files'); | ||
|
||
describe("hasFileRequirement", function() { | ||
describe("with required file element", function() { | ||
it("returns true", function() { | ||
var fixture = setFixtures('<form><ul class="requirements"><li class="incomplete" id="required-files">Add files</li></ul></form>'); | ||
var element = fixture.find('form'); | ||
target = new control.UploadedFiles(element); | ||
expect(target.hasFileRequirement).toBe(true); | ||
}); | ||
}); | ||
|
||
describe("without required file element", function() { | ||
it("returns false", function() { | ||
var fixture = setFixtures('<form><ul class="requirements"><li>Not files</li></ul></form>'); | ||
var element = fixture.find('form'); | ||
target = new control.UploadedFiles(element); | ||
expect(target.hasFileRequirement).toBe(false); | ||
}); | ||
}); | ||
}); | ||
}); |