Apply Layout/LineLength rubocop rule

Note we're excluding a few files:

* Configuration files that weren't generated by us
* Migration files that weren't generated by us
* The Gemfile, since it includes an important comment that must be on
  the same line as the gem declaration
* The Budget::Stats class, since the heading statistics are a mess and
  having shorter lines would require a lot of refactoring
This commit is contained in:
Javi Martín
2023-07-19 21:37:59 +02:00
parent 75d2782061
commit a1439d0790
156 changed files with 1330 additions and 503 deletions

View File

@@ -1,21 +1,38 @@
require "rails_helper"
describe ManagerAuthenticator do
let(:authenticator) { ManagerAuthenticator.new(login: "JJB033", clave_usuario: "31415926", fecha_conexion: "20151031135905") }
let(:authenticator) do
ManagerAuthenticator.new(login: "JJB033", clave_usuario: "31415926", fecha_conexion: "20151031135905")
end
describe "initialization params" do
it "causes auth to return false if blank login" do
blank_login_authenticator = ManagerAuthenticator.new(login: "", clave_usuario: "31415926", fecha_conexion: "20151031135905")
blank_login_authenticator = ManagerAuthenticator.new(
login: "",
clave_usuario: "31415926",
fecha_conexion: "20151031135905"
)
expect(blank_login_authenticator.auth).to be false
end
it "causes auth to return false if blank user_key" do
blank_user_key_authenticator = ManagerAuthenticator.new(login: "JJB033", clave_usuario: "", fecha_conexion: "20151031135905")
blank_user_key_authenticator = ManagerAuthenticator.new(
login: "JJB033",
clave_usuario: "",
fecha_conexion: "20151031135905"
)
expect(blank_user_key_authenticator.auth).to be false
end
it "causes auth to return false if blank date" do
blank_date_authenticator = ManagerAuthenticator.new(login: "JJB033", clave_usuario: "31415926", fecha_conexion: "")
blank_date_authenticator = ManagerAuthenticator.new(
login: "JJB033",
clave_usuario: "31415926",
fecha_conexion: ""
)
expect(blank_date_authenticator.auth).to be false
end
end
@@ -53,7 +70,8 @@ describe ManagerAuthenticator do
it "calls the permissions check method" do
allow(authenticator).to receive(:manager_exists?).and_return(true)
allow(authenticator.send(:client)).to receive(:call).with(:get_applications_user_list, message: { ub: { user_key: "31415926" }})
allow(authenticator.send(:client)).to receive(:call).with(:get_applications_user_list,
message: { ub: { user_key: "31415926" }})
authenticator.auth
end
end