Giter Site home page Giter Site logo

displaying-has-many-through-rails-lab's People

Contributors

annjohn avatar aviflombaum avatar blake41 avatar danielseehausen avatar gj avatar gnfisher avatar ihollander avatar ipc103 avatar jjseymour avatar kwebster2 avatar lkwlala avatar maxwellbenton avatar peterbell avatar pletcher avatar rrcobb avatar sdcrouse avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

displaying-has-many-through-rails-lab's Issues

FYI...

No big deal but the Doctor#index page referenced in step 2 of the instructions is not tested in the specs.

Seeds hard-coded ID's

If something is being tested dynamically, it should be created dynamically. Hard-coding the patient/doctor ID's in the seeds file cost me over 2 hours. I changed it to dynamic creation and my code worked fine.

Doctor.create([{name:"Dudeman",....}])
Appointment.create([{doctor_id:2....}])

should be

mcsteamy = Doctor.create(name:"Dudeman")
Appointment.create([{doctor_id: mcsteamy.id ....}])

You can make a PR out of my submission. I changed it there.

Readme specifies Doctor index page, but there is no test for it

The readme says: "Create a Doctor#index page that displays each doctor's name, a link to their show page, and a count of their patients."

However, there is no test for it, and the lab passes without it.

Suggested solutions: add a test for it, or delete that sentence from the readme.

Thank you.

solution branch empty

None of the important files are in the solution branch. There's no migrations, models, controllers, or views

Tests missing for Doctor#index page

On the README for this lab it says that:

  1. Create a Doctor#index page that displays each doctor's name, a link to their show page, and a count of their patients.

When running the tests, tests for this seem to have been left out. ๐Ÿคทโ€โ™‚๏ธ

Below is my test output from running learn that doesn't show any tests about the doctor's index page:

appointments
  should display an appointment's doctor
  should display an appointment's patient
  should not have an index page

doctors
  #show page
    shows all of a doctor's appointment times in a human readable format
    links to the patient's show page by name for each appointment

patients
  #index page
    lists all of the patients and the number of appointments they have
  #show page
    shows all of a patient's appointment times in a human readable format
    links to the doctor's show page by name for the doctor of each appointment

Appointment
  has a date and time
  belongs to a patient
  belongs to a doctor

Doctor
  has a name
  has a department
  has many appointments
  has many patients, through appointments

Patient
  has a name
  has an age
  has many appointments
  has many doctors, through appointments

Finished in 0.49276 seconds (files took 1.66 seconds to load)
19 examples, 0 failures

Rspec feature test for appointment#show doesn't test for datetime

"Create an Appointment#show page that shows the date, time, patient, and doctor for that particular appointment. Note that there should NOT be an Appointment#index page โ€“โ€“ we don't want to have all of the appointments on display for anyone to see."

` it "should display an appointment's doctor" do
visit appointment_path(@appointment)
expect(page).to have_link("Hawkeye Pierce", href: doctor_path(@hawkeye))
end

it "should display an appointment's patient" do
visit appointment_path(@appointment)
expect(page).to have_link("Homer Simpson", href: patient_path(@homer))
end

it "should not have an index page" do
expect {visit('/appointments')}.to raise_error(ActionController::RoutingError)
end`

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.