Enable RSpec/NotToNot cop and fix all issues

Read about cop at http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/NotToNot
This commit is contained in:
Bertocq
2018-01-07 17:39:48 +01:00
parent 79a3b97c64
commit 34bb9d65b1
143 changed files with 1041 additions and 1038 deletions

View File

@@ -9,14 +9,14 @@ describe Verification::Sms do
it "validates uniqness of phone" do
create(:user, confirmed_phone: "699999999")
sms = described_class.new(phone: "699999999")
expect(sms).to_not be_valid
expect(sms).not_to be_valid
end
it "only allows spaces, numbers and the + sign" do
expect(build(:verification_sms, phone: "0034 666666666")).to be_valid
expect(build(:verification_sms, phone: "+34 666666666")).to be_valid
expect(build(:verification_sms, phone: "hello there")).to_not be_valid
expect(build(:verification_sms, phone: "555; DROP TABLE USERS")).to_not be_valid
expect(build(:verification_sms, phone: "hello there")).not_to be_valid
expect(build(:verification_sms, phone: "555; DROP TABLE USERS")).not_to be_valid
end
end