Iteration 2 Plan - panitnt/ku-polls GitHub Wiki

Goal

This iteration's goal is to improve the navigation and page layout, add an end date for a poll, and add some useful methods so that views can query a poll using methods rather than directly testing attributes. Another goal is to externalize configuration data for increased security and portability.

Features to implement

  1. This poll has an end date. If end date, vote are not allowed.
  2. In question has methods for is_published and can_vote with unit tests.
  3. Users can return to poll list page from any page or view results without voting.
  4. Users can go to poll results page from the polls index directly.
  5. If users enter URL of a poll not yet published, then redirect him to polls list page.
  6. Separate sensitive configuration data from code.
  7. Automate running go unit tests.
  8. Add code coverage to measure how well unit tests cover our code.
  9. Improve formatting of poll detail and poll results page. Layout things in columns.

Milestone

  • The poll's end date is enforced.
  • From any page, the user can easily return to the polls list. It is not necessary to use the browser's "Back" button.
  • If a URL for an unpublished poll is entered, the user is taken to the polls list page.

Acceptance Criteria

  1. Question has end_date attribute ,has is_published and can_vote methods.
  2. Writing all unittest that can run pass all.
  3. Redirect to the polls index page and show an error message on the page when voting is not allowed.
  4. Redirect base URL to http://localhost:port/polls/.
  5. Users can visit results without voting.
  6. Add Back to List of Polls in detail and results page.
  7. Create .env file that have externalize configuration data.