* Add index and show pages for series
* Address code review
* Use `id` instead of `slug` to get collections
* Extract `collection_link` into the application helper
* Only count published articles
* Get rid of the `collection_link_class` method
* Add tests
* Fix test
* Use `**kwargs` instead of `options = {}`
20 lines
499 B
Ruby
20 lines
499 B
Ruby
require "rails_helper"
|
|
|
|
RSpec.describe "Collections", type: :request do
|
|
let(:user) { create(:user) }
|
|
let(:collection) { create(:collection, :with_articles, user: user) }
|
|
|
|
describe "GET user collections index" do
|
|
it "returns 200" do
|
|
get "/#{user.username}/series"
|
|
expect(response).to have_http_status(:ok)
|
|
end
|
|
end
|
|
|
|
describe "GET user collection show" do
|
|
it "returns 200" do
|
|
get collection.path
|
|
expect(response).to have_http_status(:ok)
|
|
end
|
|
end
|
|
end
|