Controller tests are automated tests to detect bugs in how our app processes and responds to HTTP requests.
index controller actions.
We will write and run controller tests for a sample app, LimerIQ, a limerick (poem) authoring and sharing app (https://github.com/human-se/limeriq-f24).
To get started, perform the following steps:
git clone git@github.com:human-se/limeriq-f24.git testing-activity-app
cd into the working tree.
code . to open the project in VS Code.
bundle install to ensure that the project Ruby gems are installed.
rails db:migrate:reset and rails db:seed to initialize and add seed data to the database.
rails s to run the development web server.
alice@email.com, Password: passwordbob@email.com, Password: passwordNote that a user must be signed in to create new limericks.
Note that a user “owns” the limericks they create—they are the only one who can edit or delete their limericks.
Note that there are two index pages—one that shows all limericks and one that shows only the signed-in user’s limericks.