You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are trying to test the functionality of sending a message and we are using the Factorybot but the bot can't log in and then we do not know how to have access to the message functionality.
Should we change direction and figure out what the problem with logging in is, or is there another way to get around it?
Background
We split up to two teams were one team is working on the signup and we were suppose to create the factorybot and log in to test the messages functions.
Story
Please add a story if applicable
As a User,
In order to send an email
I would like to be able to create it
Spec
We have modified the spec to first see that the login was successful as we expected.
feature 'User can' do
before do
visit user_session_path
fill_in "user_email", with: "[email protected]"
fill_in "user_password", with: "12345678"
click_on "Log in"
end
it 'create an email' do
expect(page).to have_content "Hello Name"
# click_on 'Inbox'
# click_on 'Compose'
# # choose '#'
# fill_in 'Subject', with: 'Hello'
# fill_in 'Message', with: 'Test Message'
# click_on "Send Message"
end
end
Implementation code
#spec/factories/user_bot.rb
FactoryBot.define do
factory :user do
name { "Name" }
email { "[email protected]" }
password { "12345678" }
end
end
#spec/model/user_spec.rb
require 'rails_helper'
RSpec.describe User, type: :model do
describe 'DB table' do
it { is_expected.to have_db_column :name }
end
describe 'Validations' do
it { is_expected.to validate_presence_of :name }
end
describe 'Factory' do
it 'should have valid Factory' do
expect(FactoryBot.create(:user)).to be_valid
end
end
end
Screenshots
How did you try to solve the problem?
Write the steps you took to try to fix the problem here
Problem
We are trying to test the functionality of sending a message and we are using the Factorybot but the bot can't log in and then we do not know how to have access to the message functionality.
Should we change direction and figure out what the problem with logging in is, or is there another way to get around it?
Background
We split up to two teams were one team is working on the signup and we were suppose to create the factorybot and log in to test the messages functions.
Story
Please add a story if applicable
Spec
We have modified the spec to first see that the login was successful as we expected.
Implementation code
Screenshots
How did you try to solve the problem?
Write the steps you took to try to fix the problem here
Markdown guide
The text was updated successfully, but these errors were encountered: