-
Notifications
You must be signed in to change notification settings - Fork 6
Log in feature #6
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
base: master
Are you sure you want to change the base?
Changes from 1 commit
6913aac
c1720bd
76f7174
2583dc9
2368b8d
62fbc43
d3d1558
83b73b6
d909ed5
02562d0
e637ffb
a38bda3
4dab8ae
b2da6c7
8abaa3f
3e8ec4a
22bcf67
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,3 @@ | ||
| --require spec_helper | ||
|
|
||
| --format documentation | ||
| --color | ||
|
|
||
| --color | ||
| --format documentation | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -295,7 +295,7 @@ DEPENDENCIES | |
| web-console (~> 2.0) | ||
|
|
||
| RUBY VERSION | ||
| ruby 2.6.3p62 | ||
| ruby 2.5.1p57 | ||
|
|
||
| BUNDLED WITH | ||
| 2.1.4 | ||
| 1.17.3 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,47 +1,3 @@ | ||
| ## CA Mailboxer 2018 | ||
|
|
||
| <<<<<<< HEAD | ||
| Code base for week 5 challenge - Working with legacy code | ||
|
|
||
|
|
||
|
|
||
|
|
||
| User Stories | ||
|
|
||
| As a message sender | ||
| I want an application that allows me to compose messages, | ||
| So that I can send to my friends and family. | ||
|
|
||
| As a message sender | ||
| I want to have a confirmation prompt after sending a message | ||
| So that i know the message was sucessfully sent. | ||
|
|
||
|
|
||
| As a user | ||
| I want to have an account with a password that I can login into, | ||
| So that I can can keep my messages private. | ||
|
|
||
|
|
||
| As a message sender | ||
| I want to have an inbox | ||
| So that I can store my messages | ||
|
|
||
|
|
||
| As a user | ||
| In order to see my sent message | ||
| i | ||
|
|
||
|
|
||
|
|
||
| As a message sender | ||
| I want to be able to delete messages from my inbox and sent | ||
| So that I can remove unwanted messages. | ||
|
|
||
|
|
||
|
|
||
| As a message sender | ||
| I want to store my recipients | ||
| So that I do not need to re-enter their information when I want to message them. | ||
| ======= | ||
| Code base for week 5 challenge - Working with legacy code... | ||
| >>>>>>> d3d15580843b410b3595c83957606a1c414e7c9f |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| FactoryBot.define do | ||
| factory :user do | ||
| email {'user@mail.com'} | ||
| password { 'password'} | ||
| name { 'Name'} | ||
| end | ||
| factory :user do | ||
| email {'user@mail.com'} | ||
| password { 'password'} | ||
| name { 'Name'} | ||
| end | ||
| end | ||
|
Odeane marked this conversation as resolved.
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,33 +4,31 @@ | |
| context 'Sign in to account' | ||
| before do | ||
| create(:user, email: 'user@mail.com', password: '12345678') | ||
| visit user_session_path | ||
| end | ||
| visit user_session_path | ||
| end | ||
|
|
||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. formatting |
||
| it 'displays a log in button' do | ||
| expect(page).to have_content 'Login' | ||
| click_on 'Login' | ||
| expect(page).to have_content 'Login' | ||
| click_on 'Login' | ||
| end | ||
|
|
||
| it 'displays a email form' do | ||
| expect(page).to have_content 'Email' | ||
| expect(page).to have_content 'Email' | ||
| end | ||
|
|
||
| it 'fills in email and password' do | ||
| fill_in "Email", :with => 'user@mail.com' | ||
| fill_in "Password", :with => '12345678' | ||
| click_on "Log in" | ||
| expect(page).to have_content 'Signed in successfully.' | ||
| expect(page).to have_content 'Signed in successfully.' | ||
| end | ||
|
|
||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. formatting |
||
| it 'If no email or password is entered' do | ||
| fill_in 'Email', :with => '' | ||
| fill_in 'Password', :with => '' | ||
| it 'If the email format is incorrect or the password is too short' do | ||
| fill_in 'Email', :with => '&5aygde' | ||
| fill_in 'Password', :with => '22' | ||
|
Odeane marked this conversation as resolved.
Outdated
|
||
| click_on 'Log in' | ||
| expect(page).to have_content 'Invalid Email or password.' | ||
| expect(page).to have_content 'Invalid Email or password.' | ||
| end | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please format the code |
||
|
|
||
|
|
||
| end | ||
|
Odeane marked this conversation as resolved.
|
||
|
|
||
|
|
||
|
Odeane marked this conversation as resolved.
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,20 +1,20 @@ | ||
| require 'rails_helper' | ||
|
|
||
| RSpec.describe User, type: :model do | ||
| describe 'db table' do | ||
| it {is_expected.to have_db_column :email} | ||
| it {is_expected.to have_db_column :encrypted_password} | ||
| it {is_expected.to have_db_column :name} | ||
| end | ||
| describe 'db table' do | ||
| it {is_expected.to have_db_column :email} | ||
| it {is_expected.to have_db_column :encrypted_password} | ||
| it {is_expected.to have_db_column :name} | ||
| end | ||
|
|
||
| describe 'validations' do | ||
| it {is_expected.to validate_presence_of :email} | ||
| it {is_expected.to validate_presence_of :password} | ||
| end | ||
| describe 'validations' do | ||
| it {is_expected.to validate_presence_of :email} | ||
| it {is_expected.to validate_presence_of :password} | ||
| end | ||
|
|
||
| describe 'Factory' do | ||
| it 'should have valid factory' do | ||
| expect(FactoryBot.create(:user)).to be_valid | ||
| end | ||
| describe 'Factory' do | ||
| it 'should have valid factory' do | ||
| expect(FactoryBot.create(:user)).to be_valid | ||
| end | ||
| end | ||
| end | ||
|
Odeane marked this conversation as resolved.
|
||
Uh oh!
There was an error while loading. Please reload this page.