summaryrefslogtreecommitdiffstats
path: root/tests/ConcertsTableTest.php
Commit message (Collapse)AuthorAgeFilesLines
* Clean up, fix and rename db tables.Harald Eilertsen2021-09-161-2/+2
| | | | | | | | | | | | | | | | | This patch got a bit more involved than what was originally planned, but since we're messing with the tables I decided to do it all right away. - Moves the constraint definition to the CREATE TABLE statement for the concerts table. This replaces the existing KEY definition that it had. - Make sure the venues table is created before the concerts table so that the above mentioned constraint definition works. - Rename the tables. Use the wpdb-prefix and make the name a bit prettier. This caused some changes in the Concert and Venue classes, and for slightly silly reasons some test classes. The code actually turned out better (for the most part), but some refactoring can still be done. The column names remains unchanged for now.
* Update ConcertsTable tests.Harald Eilertsen2021-09-111-3/+65
| | | | | Test that less privileged users don't see all the controls, and that no controls are rendered on the public facing pages.
* tests: Make an actual test for ConcertsTableHarald Eilertsen2021-09-111-5/+24
| | | | | | | | | | | There's a bit of setup to make this work as it should, we need to ensure that the current user and current screen is set to proper values so that the WordPress api's `is_admin()` and `current_user_can()` work as they should. This first test just tests that all the expected forms are being rendered for the admin user accessing the table through the site admin interface.
* Add test for ConcertsTableHarald Eilertsen2021-09-051-0/+94