Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test and mvc: wrote tests for the discover movies page and implemente… #20

Merged
merged 1 commit into from
Oct 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion app/controllers/discover_controller.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
class DiscoverController < ApplicationController
def index

end
end
5 changes: 5 additions & 0 deletions app/controllers/movies_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class MoviesController < ApplicationController
def index

end
end
14 changes: 13 additions & 1 deletion app/views/discover/index.html.erb
Original file line number Diff line number Diff line change
@@ -1 +1,13 @@
<h1> Discover Movies</h1>
<h1> Discover Movies</h1>

<section id="top_movies">
<p><%= button_to "Discover Top Rated Movies", user_movies_path, method: :get %>
</section>

<section id="movie_search">
<%= form_with url: user_movies_path, method: :get do |f| %>
<%= f.label :search_by_movie_title, "Search By Movie Title" %>
<%= f.text_field :search_by_movie_title %>
<%= f.submit "Search" %>
<% end %>
</section>
1 change: 1 addition & 0 deletions app/views/movies/index.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<h1>Welcome to the Movies Page</h1>
1 change: 1 addition & 0 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@

resources :users, only: %i[show new create] do
resources :discover, only: [:index]
resources :movies, only: [:index]
end
end
2 changes: 1 addition & 1 deletion coverage/.last_run.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"result": {
"line": 96.77
"line": 97.27
}
}
71 changes: 59 additions & 12 deletions coverage/.resultset.json
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@
null,
1,
1,
1,
null,
null
]
Expand All @@ -266,6 +267,44 @@
null
]
},
"/Users/noellehemphill/turing_work/3mod/projects/viewing_party_lite_7/spec/features/landing_page/index_spec.rb": {
"lines": [
1,
null,
1,
1,
1,
1,
1,
null,
1,
null,
1,
1,
null,
1,
null,
1,
1,
1,
1,
null,
1,
null,
1,
null,
null,
1,
null,
1,
null,
1,
null,
1,
null,
null
]
},
"/Users/noellehemphill/turing_work/3mod/projects/viewing_party_lite_7/spec/features/users/show_spec.rb": {
"lines": [
1,
Expand Down Expand Up @@ -404,11 +443,10 @@
null
]
},
"/Users/noellehemphill/turing_work/3mod/projects/viewing_party_lite_7/app/controllers/landing_page_controller.rb": {
"/Users/noellehemphill/turing_work/3mod/projects/viewing_party_lite_7/app/controllers/discover_controller.rb": {
"lines": [
1,
1,
2,
null,
null
]
Expand All @@ -421,6 +459,24 @@
null
]
},
"/Users/noellehemphill/turing_work/3mod/projects/viewing_party_lite_7/app/controllers/movies_controller.rb": {
"lines": [
1,
1,
null,
null,
null
]
},
"/Users/noellehemphill/turing_work/3mod/projects/viewing_party_lite_7/app/controllers/landing_page_controller.rb": {
"lines": [
1,
1,
2,
null,
null
]
},
"/Users/noellehemphill/turing_work/3mod/projects/viewing_party_lite_7/app/controllers/users_controller.rb": {
"lines": [
1,
Expand All @@ -442,17 +498,8 @@
null,
null
]
},
"/Users/noellehemphill/turing_work/3mod/projects/viewing_party_lite_7/app/controllers/discover_controller.rb": {
"lines": [
1,
1,
null,
null,
null
]
}
},
"timestamp": 1697073511
"timestamp": 1697147391
}
}
Loading