Enable RSpec/RepeatedExample cop & fix all issues
Read about cop at http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/RepeatedExample
This commit is contained in:
@@ -158,4 +158,7 @@ RSpec/PredicateMatcher:
|
||||
Enabled: true
|
||||
|
||||
RSpec/RepeatedDescription:
|
||||
Enabled: true
|
||||
|
||||
RSpec/RepeatedExample:
|
||||
Enabled: true
|
||||
@@ -210,15 +210,6 @@ feature 'Emails' do
|
||||
end
|
||||
end
|
||||
|
||||
scenario "Email depending on user's locale" do
|
||||
sign_up
|
||||
|
||||
email = open_last_email
|
||||
expect(email).to have_subject('Confirmation instructions')
|
||||
expect(email).to deliver_to('manuela@consul.dev')
|
||||
expect(email).to have_body_text(user_confirmation_path)
|
||||
end
|
||||
|
||||
scenario "Email on unfeasible spending proposal" do
|
||||
Setting["feature.spending_proposals"] = true
|
||||
|
||||
|
||||
@@ -36,12 +36,6 @@ feature "Home" do
|
||||
Setting['feature.user.recommendations'] = nil
|
||||
end
|
||||
|
||||
scenario 'Display recommended section' do
|
||||
debate = create(:debate, tag_list: "Sport")
|
||||
visit root_path
|
||||
expect(page).to have_content "Recommendations that may interest you"
|
||||
end
|
||||
|
||||
scenario 'Display recommended section when feature flag recommended is active' do
|
||||
debate = create(:debate, tag_list: "Sport")
|
||||
visit root_path
|
||||
|
||||
@@ -53,24 +53,7 @@ feature 'Tracking' do
|
||||
expect(page.html).to include "data-track-event-action=start_census"
|
||||
end
|
||||
|
||||
scenario 'Verification: success census' do
|
||||
create(:geozone)
|
||||
user = create(:user)
|
||||
login_as(user)
|
||||
|
||||
visit account_path
|
||||
click_link 'Verify my account'
|
||||
|
||||
verify_residence
|
||||
|
||||
fill_in 'sms_phone', with: "611111111"
|
||||
click_button 'Send'
|
||||
|
||||
expect(page.html).to include "data-track-event-category=verification"
|
||||
expect(page.html).to include "data-track-event-action=start_sms"
|
||||
end
|
||||
|
||||
scenario 'Verification: start sms' do
|
||||
scenario 'Verification: success census & start sms' do
|
||||
create(:geozone)
|
||||
user = create(:user)
|
||||
login_as(user)
|
||||
|
||||
@@ -230,7 +230,7 @@ describe Abilities::Common do
|
||||
it { should be_able_to(:destroy, own_investment_in_accepting_budget) }
|
||||
it { should be_able_to(:destroy, own_investment_in_reviewing_budget) }
|
||||
it { should_not be_able_to(:destroy, own_investment_in_selecting_budget) }
|
||||
it { should_not be_able_to(:destroy, investment_in_balloting_budget) }
|
||||
it { should_not be_able_to(:destroy, own_investment_in_balloting_budget) }
|
||||
|
||||
it { should_not be_able_to(:create, ballot_in_accepting_budget) }
|
||||
it { should_not be_able_to(:create, ballot_in_selecting_budget) }
|
||||
|
||||
Reference in New Issue
Block a user