tweaks for rubocop
This commit is contained in:
parent
cf8a5bcaec
commit
d2267beb89
7 changed files with 14 additions and 15 deletions
|
@ -27,7 +27,7 @@ class AddEmailConfirmation < ActiveRecord::Migration
|
|||
|
||||
def change
|
||||
add_column :emails, :confirmation_token, :string
|
||||
add_column :emails, :confirmed_at, :datetime
|
||||
add_column :emails, :confirmation_sent_at, :datetime
|
||||
add_column :emails, :confirmed_at, :datetime_with_timezone
|
||||
add_column :emails, :confirmation_sent_at, :datetime_with_timezone
|
||||
end
|
||||
end
|
||||
|
|
|
@ -31,6 +31,6 @@ class AddEmailConfirmationIndex < ActiveRecord::Migration
|
|||
end
|
||||
|
||||
def down
|
||||
remove_index :emails, :confirmation_token if index_exists?(:emails, :confirmation_token)
|
||||
remove_concurrent_index :emails, :confirmation_token if index_exists?(:emails, :confirmation_token)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -30,6 +30,7 @@ module Gitlab
|
|||
ci
|
||||
dashboard
|
||||
deploy.html
|
||||
emails
|
||||
explore
|
||||
favicon.ico
|
||||
files
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe Profiles::EmailsController do
|
||||
|
||||
let(:user) { create(:user) }
|
||||
|
||||
before do
|
||||
|
@ -29,7 +28,7 @@ describe Profiles::EmailsController do
|
|||
end
|
||||
|
||||
it 'unable to resend an email confirmation' do
|
||||
expect {put(:resend_confirmation_instructions, { id: 1 })}.to_not change { ActionMailer::Base.deliveries.size }
|
||||
expect {put(:resend_confirmation_instructions, { id: 1 })}.not_to change { ActionMailer::Base.deliveries.size }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -37,7 +37,7 @@ feature 'Profile > Emails' do
|
|||
expect(page).to have_content("my@email.com")
|
||||
|
||||
click_link('Remove')
|
||||
expect(page).to_not have_content("my@email.com")
|
||||
expect(page).not_to have_content("my@email.com")
|
||||
end
|
||||
|
||||
scenario 'User confirms email' do
|
||||
|
@ -65,8 +65,7 @@ feature 'Profile > Emails' do
|
|||
email.update_attribute(:confirmation_sent_at, nil)
|
||||
visit profile_emails_path
|
||||
|
||||
expect(page).to_not have_content('Resend confirmation email')
|
||||
expect(page).not_to have_content('Resend confirmation email')
|
||||
expect(page).to have_content('Send confirmation email')
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -8,7 +8,7 @@ describe Emails::ConfirmService do
|
|||
|
||||
describe '#execute' do
|
||||
it 'sends a confirmation email again' do
|
||||
email = user.emails.create(email: opts[:email])
|
||||
user.emails.create(email: opts[:email])
|
||||
mail = service.execute
|
||||
expect(mail.subject).to eq('Confirmation instructions')
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue