Code Monkey home page Code Monkey logo

mediaranker-revisited's Introduction

Media Ranker Revisited

Learning Goals

  • Add tests to controllers to verify controller logic
  • Practice using OAuth in a web application
  • Practice using Session variables to track a user across multiple HTTP requests

Project Description

We are providing you with an implementation of MediaRanker. Use this MediaRanker to begin this project.

Our MediaRanker web app was a wonderful website with two major flaws:

  1. our controllers are untested
  2. the way we implemented user login is extremely insecure

In this assignment you will modify Media Ranker in two ways:

  1. our controllers will finally have tests that test controller logic
  2. our web app can securely authenticate multiple users via OAuth and authorize them to view, manage and vote on works

Build your project using branches, with at least one branch per wave. As you finish a wave merge the changes into the main branch. Submit one pull request at the end once you are complete.

Wave 1: Controller Tests

Take some time to understand what each controller is doing. Add tests to the existing controllers in this project. Be sure to consider both nominal and edge cases for every user flow possible.

Requirements

  • Tests on CRUD operations that your controller can execute
    • Create
      • What should happen if the controller executes creation of something with valid data?
      • ... with invalid data?
    • Read (Show)
      • What should happen if the controller tries to read/show an ID of a model that exists in the DB?
      • ... that doesn't exist in the DB?
    • Update
      • What should happen if the controller executes an update of something with valid data?
      • ... with invalid data?
    • Delete
      • What should happen if the controller tries to delete an ID of a model that exists in the DB?
      • ... that doesn't exist in the DB?
  • Tests rendering, routing, and HTTP status when appropriate
  • Tests updates to the model when appropriate
  • Tests custom controller logic and custom routes when appropriate
    • Tests positive, negative, nominal and edge cases

Due Date

This project is due before class May 1 via PR against Ada-C9/MediaRanker-Revisited.

Resources

mediaranker-revisited's People

Contributors

kariabancroft avatar tildeee avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.