We get rid of database cleaner, and JavaScript tests are faster because between tests we now rollback transactions instead of truncating the database.
18 lines
352 B
Ruby
18 lines
352 B
Ruby
require "rails_helper"
|
|
|
|
describe "Admin comments" do
|
|
before do
|
|
admin = create(:administrator)
|
|
login_as(admin.user)
|
|
end
|
|
|
|
scenario "Index" do
|
|
create(:comment, body: "Everything is awesome")
|
|
|
|
visit admin_root_path
|
|
within("#side_menu") { click_link "Comments" }
|
|
|
|
expect(page).to have_content "Everything is awesome"
|
|
end
|
|
end
|