-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added and tested download csv link for annotations page
Download csv link added to listen page Link function simplified and improved to use other library functions Added unit tests for csv making function and $url.formatUri function Fixed a bug in string.format
- Loading branch information
Showing
8 changed files
with
138 additions
and
59 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
describe("The service suite", function () { | ||
|
||
var audioEventService; | ||
var pathService; | ||
|
||
beforeEach(module('bawApp.services')); | ||
|
||
beforeEach(inject(["AudioEvent", "conf.paths", function (AudioEvent, paths) { | ||
audioEventService = AudioEvent; | ||
pathService = paths; | ||
|
||
|
||
}])); | ||
|
||
it("should format the csv link correctly", function () { | ||
var parameters = { | ||
projectId: 12, | ||
siteId: 13, | ||
audioRecordingId: 42, | ||
startOffset: 123456, | ||
endOffset: 654321 | ||
}; | ||
|
||
var expected = pathService.api.root + "/audio_events/download.csv?projectId=12&siteId=13&audioRecordingId=42&startOffset=123456&endOffset=654321"; | ||
|
||
var actual = audioEventService.csvLink(parameters); | ||
|
||
expect(actual).toBe(expected); | ||
}); | ||
|
||
|
||
it("should format the csv link correctly with an empty parameter set", function () { | ||
var parameters; | ||
var expected = pathService.api.root + "/audio_events/download.csv"; | ||
|
||
var actual = audioEventService.csvLink(parameters); | ||
|
||
expect(actual).toBe(expected); | ||
|
||
}); | ||
|
||
}); |
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