Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unit tests- shifts, events, documents #228

Merged
merged 5 commits into from
Feb 27, 2017
Merged

Conversation

ghost
Copy link

@ghost ghost commented Feb 27, 2017

Expanded upon unit tests for models- documents, faq, shifts, shift_type, shift_participant
Created unit tests and added in factory girl for - events, event_type

@coveralls
Copy link

Coverage Status

Coverage increased (+0.07%) to 13.859% when pulling aecbc8c on erw/Testing into c47166f on 17/goat/main.

@brucethesloth brucethesloth merged commit 188f171 into 17/goat/main Feb 27, 2017
sclark pushed a commit that referenced this pull request Apr 11, 2017
* updated the gemfile to include single test gem

* Changed participant test for a current student in integration, added relationship to document test

* Created Units tests for Charge model

* Unit tests- shifts, events, documents (#228)

* Created intial files for event and event type tests, modified documents relationships test

* Document unit tests done, besides one clarification issue with search scope

* Event unit tests done, added event and event type in factories.rb

* Finished unit tests for FAQ

* Fixed last error in document, have shift, shift type, and shift participant test passing

* Unit Test - Tools (#229)

* Created intial files for event and event type tests, modified documents relationships test

* Document unit tests done, besides one clarification issue with search scope

* Event unit tests done, added event and event type in factories.rb

* Finished unit tests for FAQ

* Fixed last error in document, have shift, shift type, and shift participant test passing

* Made time to now instad of local in shift formatted_name test, finished toop type unit test and scope for tool test. Need to finish tool methods and tool_waitlist unit tests

* FInished all unit test assigned to me besides tool and tool waitlist. Once tool waitlist is done, finish tool waitlist method in the tool unit test

* Finished tool_waitlist test and finished the last method test in tool_test (now complete)

* Test Cases for several models (#231)

* created unit test for organization model. almost done

* switching to goat branch to checkout akshay's commit

* begining to modify test class for organization_alias_class. trying to merge rumby's modification on factories into my test branch

* finished creating test class for organization_alias model. Everything functions properly

* updated test for organization_category model. Everything functions properly

* created new factory for organization_status_type. created a new test class for orgniazation_status but have been getting error message: factory not registered. Will come back to this later

* fixed error! added organization_status to the factory file. test for organization_status now passed!

* checking Rumby's PR. commiting before switching to goat

* fixed previous file name error. Test for organization_status_type passed

* finished up organization_timeline_entry test. removed duplicate schema comment in the status_type

* updated organization test to include dependency testing

* did some refactoring on organization_alias model and test

* created test function for downtime methods

* fixed syntax for org_category test. added test case for dependency

* fixed minor syntax in test case for org_status and org_status_type

* added test case for membership

* added test case for judge, judgement, judgement_category

* Added authorization checks - Home Controller & fixed Event okay/un-okay button (#234)

* Added authorization checks so that anyone who isnt logged in cannot see downtime, charges overview, or hardhats

* Changed the okay button to correct type of HTTP request so that the events ok/unokay works

* Cleaned code (moved authorization from views to controllers) for charges (now participants can't read charges pages from views)

* Commented shift test out, opened it up as a bug though so we know to go back and figure out the CI error on it

* Added Dependency Tests for Participant, Coverage for Other Models & Bugfix (#237)

* Added tests for charge_type model

* Added tests for role model

* Added tests for StoreItem model

* Added tests for StorePurchase model

* Added tests for Checkout model

* Fixed charge model coverage

* Added tests to charge_type, checkout, and partly participant

* Added full test coverage for Task model

* Added fixes to participant model tests

* Added dependency tests for participant

* Fixed duplicate cart items bug

* Edited factory file to get rid of merge conflict

* Added schema.rb file

* Added Placeholder value for receiving participant when updating charges (#239)

* created unit test for organization model. almost done

* switching to goat branch to checkout akshay's commit

* begining to modify test class for organization_alias_class. trying to merge rumby's modification on factories into my test branch

* finished creating test class for organization_alias model. Everything functions properly

* updated test for organization_category model. Everything functions properly

* created new factory for organization_status_type. created a new test class for orgniazation_status but have been getting error message: factory not registered. Will come back to this later

* fixed error! added organization_status to the factory file. test for organization_status now passed!

* checking Rumby's PR. commiting before switching to goat

* fixed previous file name error. Test for organization_status_type passed

* finished up organization_timeline_entry test. removed duplicate schema comment in the status_type

* updated organization test to include dependency testing

* did some refactoring on organization_alias model and test

* created test function for downtime methods

* fixed syntax for org_category test. added test case for dependency

* fixed minor syntax in test case for org_status and org_status_type

* added test case for membership

* added test case for judge, judgement, judgement_category

* somehow event_type_test got updated with a new schema entry. Saving change before checking out akshay's unit tests

* updated TravisCI's timezone to US Eastern time, which should match with the built in timezone indicated in application.rb

* changed TRAVIS CI Setting to eastern time

* trying to see if this fix for time works

* travis yml syntax incorrect in the previous commit. just fixed it now. Hopefully this works

* travis could not load timezone data. trying a different method

* both attempts failed. reverted back to master branch version of travis configuration. Will create an issue

* added redirect back to organization as a temporary solution for bug #201

* made modification to the charge param and fixed odd behavior, described in issue #202

* added placeholder value so that the receiving_participant does not seem to disappear

* Update .travis.yml

* Update event_type_test.rb

* Cleaned Code for charge, charge_type, checkouts, and documents  (#242)

* Cleaned code for charges and charge type

* Cleaned code for checkout

* Cleaned code for documents besides the new

* Cleaned views for events and event types

* cleaned code for faqs

* Added timezone on CI server config to correct CI server shift error (#245)

* Reproducing issue #235

* Changing CI timezone to fix issue #235

* Ak/twilio notifications2 (#253)

* added twilio messenger module, also tweaked the application config to autoload the module

* Added 2 scenarios for notifications

* Fixed organization timeline entry twilio notification

* Fixed bugs for watch shift twilio notifications

* Added assigned field to events and notifications for assignees when note is assigned to them

* Switched notification delays to production times

* Bl/waitlist notify (#254)

* added twilio messenger module, also tweaked the application config to autoload the module

* tried to modified messenger with text processing but failed

* added code to send out text alert to the next person on the wait list after a tool is checked back in

* added a safeguard for phone number in case someone has not put their phonenumber in the system yet

* updated messenger module with try-rescue block

* commented out code for reply forwarding. There is an issue for the forwarding and it seems to be security related. Need to discuss it with people more knowledgable before implemeting this feature

* removed commented code. Will probably add it to a seperate branch. Just trying to merge this code to goat branch

* modified messenger to keep track of error code

* New features branch (#252)

* Prevent participants from skipping saftey video

* Added user certifications

* Add certification check to tools checkout

* Only show certifications required by tool type if they exist

* Added cancan checks around certification creation and deletion

* Added wristband field to participant view to help with wristband distribution #220

* Added digital signature to waiver #173

* Cleaned waiver code

* Changed store items price datatype to support fractional prices #168

* Added rake db:migrate to travis script so it can build with migrations

* Added rake db:migrate to travis script so it can build with migrations

* Fixing style on PR #248

* Removing nil check for PR #248

* Changed error message after skipping the saftey video

* Using migration technique from http://stackoverflow.com/questions/17150529

* Reverting to previous 9V battery price

* Fixing spelling of 'safety'

* Define wristband colors as constants

* Added load_and_authorize_resource to CertificationsController

* Changed building_status to is_building in db seeds file

* Fixed waiver playing in bg for admin and allow admin to skip video

* Added scissor lift wristband color

* Updated safety video

* Cleaned up waiver code and let user skip waiver on error from previous error

* Fixed ForbiddenAttribute error on certification creation

* Fixed messed up sidebar on SCC member new waiver

* Removed duplicate gems in Gemfile

* Added delayed_job bin to git (platanus/capistrano3-delayed-job#21)

* Fixed db migration for is_building field in organization_category

* Added requested legal clauses to waiver

* Fixed scissor lift wristband color

* Bl/waitlist notify (#259)

* added twilio messenger module, also tweaked the application config to autoload the module

* tried to modified messenger with text processing but failed

* added code to send out text alert to the next person on the wait list after a tool is checked back in

* added a safeguard for phone number in case someone has not put their phonenumber in the system yet

* updated messenger module with try-rescue block

* commented out code for reply forwarding. There is an issue for the forwarding and it seems to be security related. Need to discuss it with people more knowledgable before implemeting this feature

* removed commented code. Will probably add it to a seperate branch. Just trying to merge this code to goat branch

* modified messenger to keep track of error code

* made change to charges controller as requested

* Ak/twilio notifications2 (#258)

* added twilio messenger module, also tweaked the application config to autoload the module

* Added 2 scenarios for notifications

* Fixed organization timeline entry twilio notification

* Fixed bugs for watch shift twilio notifications

* Added assigned field to events and notifications for assignees when note is assigned to them

* Switched notification delays to production times

* Added tweaks stephen requested, including showing preview of the event in text, fixing the scc exec member drop down, and sending a text when everyone is confirmed for a watch shift

* Added production times for shift notifications

* Added proper messenger code

* Fixed up gemfile for merge

* Fixed delayed_job mis-spelling

* Update participant_test.rb

* Updated safety video
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants