Commit graph

12 commits

Author SHA1 Message Date
144b5cab58 Return proper REST response for deleting a party for more endpoints 2025-09-22 02:51:50 -07:00
7ab6355f17 Add error classes for drag-drop validation
- InvalidPositionError for out-of-bounds positions
- PositionOccupiedError for occupied slot conflicts
2025-09-16 03:27:19 -07:00
d6300f7aeb
Add first round of tests (#178)
* Install Rspec

* Create .aidigestignore

* Update rails_helper

- Added sections and comments
- Add support for loading via canonical.rb
- Add FactoryBot syntax methods
- Disable SQL logging in test environment

* Move gems around

* Add canonical.rb and test env CSVs

We load these CSVs via canonical.rb when we run tests as a data source for canonical objects.

* Remove RBS for now

This is too much and we need to find the right solution

* Refactor GridSummonsController and add tests

* Create GridSummon factory

* Refactor GridSummon and add documentation and tests

* Create have_error_on.rb

* Update .aidigestignore

* Fix warnings

* Add GridWeapons and Parties factories

* Refactor GridWeapon and add documentation and tests

* Create .rubocop.yml

* Create no_weapon_provided_error.rb

* Refactor GridWeaponsController

- Refactors controller
- Adds YARD documentation
- Adds Rspec tests

* Refactor GridSummonsController

- Refactors controller
- Adds YARD documentation
- Adds Rspec tests

* Enable shoulda/matchers

* Update User factory

* Update party.rb

We moved updating the party's element and extra flag to inside the party. We use an after_commit hook to minimize the amount of queries we're running to do this.

* Update party.rb

We change setting the edit key to use the conditional assignment operator so that it doesn't get overridden when we're running tests. This shouldn't have an effect in production.

* Update api_controller.rb

Change render_unprocessable_entity_response to render the errors hash instead of the exception so that we get more helpful errors.

* Add new errors

Added NoCharacterProvidedError and NoSummonProvidedError

* Add tests and docs to GridCharacter

We added a factory, spec and documentation to the GridCharacter model

* Ensure numericality

* Move enums into GranblueEnums

We don't use these yet, but it gives us a structured place to pull them from.

* Refactor GridCharactersController

- Refactors controller
- Adds YARD documentation
- Adds Rspec tests

* Add debug hook and other small changes

* Update grid_characters_controller.rb

Removes logs

* Update .gitignore

* Update .aidigestignore

* Refactored PartiesController

- Split PartiesController into three concerns
- Implemented testing for PartiesController and two concerns
- Implemented fixes across other files to ensure PartiesController tests pass
- Added Favorites factory

* Implement SimpleCov

* Refactor Party model

- Refactors Party model
- Adds tests
- Adds documentation

* Update granblue_enums.rb

Remove included block
2025-02-12 02:42:30 -08:00
13a9644bb0
(Hotfix) Fixes a variety of small bugs (#115)
* Remove ap call

* Fix remix render method

* Downcase username on db end

There was a bug where users with capital letters in their name could not access their profiles after we tried to make things case insensitive.

* Remove ap call and unused code
2023-07-04 03:21:02 -07:00
adbb5b6c7d Disallow adding arbitrary weapons to Extra slots 2022-12-25 00:23:27 -08:00
f86aa30791 GranblueError should not require input param 2022-12-21 15:50:06 -08:00
c1716c1e4f Run RuboCop on everything
yolo
2022-12-21 00:22:47 -08:00
a08421722f Add GranblueError and move app errors to extend it 2022-12-03 18:21:01 -08:00
4ee90f6c09 Add new errors and fix handling in ApiController 2022-12-03 11:43:56 -08:00
f6613d6e91 Add TooManySkillsOfTypeError 2022-12-02 20:45:46 -08:00
c0bdb47d43 Add scoped search for job skills 2022-11-30 02:03:28 -08:00
438fc7294d Add custom errors 2022-02-27 19:03:04 -08:00