osu-cass/SeaGrant_Proto — pull request #35 by holmesmo (2014-11-13 00:44:04+00:00)
Title: Test code review update

Commit 8ac3eb4:
Changes to app/controller/List.js:
console.log added in multiple places for debugging assistance.
Changes to tests/jasmine-standalone/SpecRunner.html:
Script source files added so that SpecRunner can run corresponding tests.
Changes to tests/jasmine-standalone/spec/javascripts/controller/listSpec.js:
xdescribe changed to describe, enabling the SeaGrant_Proto.controller.List function to be tested
Added mocking data to view, store, variable in the beforeEach function call.
Added new test functions: onSetUseLocation, onSetDistance, onChooseLocation,
onChooseProduct.

Commit 2ff49c3:
Changes to app/controller/List.js:
Removed onHome function.
Commented-out console.log previously added for debugging assistance.
Changed vendcount to Seagrant_Proto.vendcount.
Changes to tests/jasmine-standalone/spec/javascripts/controller/listSpec.js:
Removed console.log.
Changed vendount to SeaGrant_Proto.vendcount.numItems.

Commit 9910299:
Changes to app/store/Location.js, app/store/Product.js, app/store/Vendor.js,
app/store/VendorInventory.js:
Removed previously commented out sections.
Removed pageParam: false, startParam: false, and limitParam: false.
Changes to tests/jasmine-standalone/spec/javascripts/store/distanceSpec.js:
Added 'Is populated with distance data' function tests for all distance options besides 200,
(e.g., 175, 150, 125, 100, 75, 50, 25, 20, 15, 10, 5).
Changes to tests/jasmine-standalone/spec/javascripts/store/educationSpec.js:
Added 'Is populated with education data' function tests for item[i].data.text besides when i = 1,
(e.g., 2, 3, 4, 5).
Changes to tests/jasmine-standalone/spec/javascripts/store/locationSpec.js:
In 'loads multiple datas from an api' function, differentiated between the two test cases' data,
(e.g., instead of title: 'Test' for both cases, use title:'Test1' for first test case
and title:'Test2' for second test case).
In 'loads multiple datas from an api' function, changed expect functions to reflect new data
expectations.
In 'loads multiple datas from an api' function, used getAt(0) and getAt(1) for each case,
instead of getAt(0) for both cases.
Changes to tests/jasmine-standalone/spec/javascripts/store/productSpec.js:
In 'loads data from an api' function, added expect functions for 'alt_name' and 'story_id'
attributes.
In 'loads multiple datas from an api' function, differentiated between the two test cases' data.
In 'loads multiple datas from an api' function, changed expect functions to reflect new data
expectations.
In 'loads multiple datas from an api' function, incorrectly changed expect statements for second
test case from getAt(1) to getAt(0). Fixed in next commit (09bb5f6).
Changes to tests/jasmine-standalone/spec/javascript/store/vendorSpec.js:
In 'loads multiple datas from an api' function, differentiated between the two tests cases' data.
In 'loads multiple datas from an api' function, changed expect functions to reflect new data
expectations.

Commit 09bb5f6:
Changes to tests/jasmine-standalone/spec/javascripts/store/productSpec.js:
In 'loads multiple datas from an api' function, expect statements for second test case changed
back from getAt(0) the correct getAt(1).