Setup Faker and Factorybot
This commit is contained in:
20
spec/features/contest_spec.rb
Normal file
20
spec/features/contest_spec.rb
Normal file
@@ -0,0 +1,20 @@
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.feature "Contests", type: :feature do
|
||||
context "visiting the home page" do
|
||||
let!(:user) { create(:user) }
|
||||
|
||||
before do
|
||||
visit '/'
|
||||
fill_in "Email address", with: user.email_address
|
||||
fill_in "Password", with: user.password
|
||||
click_button "Sign in"
|
||||
end
|
||||
|
||||
it "should display the username" do
|
||||
visit root_path
|
||||
|
||||
expect(page).to have_content(user.username)
|
||||
end
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user