-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add company to client #79
base: master
Are you sure you want to change the base?
Conversation
VCR.use_cassette("companies/create/success") do | ||
company = subject.create(params) | ||
expect(company).to be_a(entity_klass) | ||
expect(company.name).to eq(params['name']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
describe "#update" do | ||
it "returns a Company instance updated" do | ||
VCR.use_cassette("companies/update/success") do | ||
company = subject.update(227, {name: "RSpec integration"}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Layout/SpaceInsideHashLiteralBraces: Space inside { missing.
Style/BracesAroundHashParameters: Redundant curly braces around a hash parameter.
Layout/SpaceInsideHashLiteralBraces: Space inside } missing.
@@ -0,0 +1,77 @@ | |||
require "spec_helper" | |||
|
|||
describe Cobrato::Resources::Company do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Metrics/BlockLength: Block has too many lines. [66/25]
@@ -0,0 +1,77 @@ | |||
require "spec_helper" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true.
|
||
subject { described_class.new(attributes) } | ||
|
||
it_behaves_like "entity_attributes", [:id, :national_identifier_type, :national_identifier, :name, :zipcode, :city, :state, :neighbourhood, :number, :complement, :street] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/SymbolArray: Use %i or %I for an array of symbols.
Metrics/LineLength: Line is too long. [172/120]
@@ -0,0 +1,22 @@ | |||
require "spec_helper" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true.
lib/cobrato/resources/company.rb
Outdated
end | ||
end | ||
end | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Layout/TrailingBlankLines: Final newline missing.
@@ -0,0 +1,13 @@ | |||
module Cobrato |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true.
lib/cobrato/entities/company.rb
Outdated
attribute :street, String | ||
end | ||
end | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Layout/TrailingBlankLines: Final newline missing.
@@ -0,0 +1,17 @@ | |||
module Cobrato |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true.
it_behaves_like "entity_attributes", | ||
[ | ||
# Shared with all | ||
:id, :payment_config_id, :payment_type, :payment_method, :amount, :date, :registration_status, :our_number, | ||
:bank_code, :payee_document_type, :payee_document, :payee_name, :note, | ||
:bank_code, :payee_document_type, :payee_document, :payee_name, :note, :company_document_type, :company_document, :company_name, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Metrics/LineLength: Line is too long. [134/120]
|
||
describe '#payee_document_type' do | ||
it 'print a deprecation warning' do | ||
expect { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/BlockDelimiters: Avoid using {...} for multi-line blocks.
end | ||
|
||
describe '#payee_document_type' do | ||
it 'print a deprecation warning' do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
end | ||
end | ||
|
||
describe '#payee_document_type' do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
|
||
describe '#payee_document' do | ||
it 'print a deprecation warning' do | ||
expect { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/BlockDelimiters: Avoid using {...} for multi-line blocks.
@@ -61,15 +65,47 @@ | |||
|
|||
subject { described_class.new(attributes) } | |||
|
|||
describe '#payee_id' do | |||
it 'print a deprecation warning' do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
@@ -61,15 +65,47 @@ | |||
|
|||
subject { described_class.new(attributes) } | |||
|
|||
describe '#payee_id' do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
@@ -29,9 +30,17 @@ | |||
|
|||
subject { described_class.new(attributes) } | |||
|
|||
describe '#payee_id' do | |||
it 'print a deprecation warning' do | |||
expect { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/BlockDelimiters: Avoid using {...} for multi-line blocks.
@@ -29,9 +30,17 @@ | |||
|
|||
subject { described_class.new(attributes) } | |||
|
|||
describe '#payee_id' do | |||
it 'print a deprecation warning' do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
@@ -29,9 +30,17 @@ | |||
|
|||
subject { described_class.new(attributes) } | |||
|
|||
describe '#payee_id' do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
describe "#update" do | ||
it "returns a Company instance updated" do | ||
VCR.use_cassette("companies/update/success") do | ||
company = subject.update(227, { name: "RSpec integration" }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/BracesAroundHashParameters: Redundant curly braces around a hash parameter.
@@ -0,0 +1,78 @@ | |||
# frozen_string_literal: true | |||
require "spec_helper" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
|
||
subject { described_class.new(attributes) } | ||
|
||
it_behaves_like "entity_attributes", %i[id national_identifier_type national_identifier name zipcode city state neighbourhood number complement street] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Metrics/LineLength: Line is too long. [153/120]
@@ -0,0 +1,23 @@ | |||
# frozen_string_literal: true | |||
require "spec_helper" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
end | ||
end | ||
|
||
it_behaves_like "entity_attributes", [:id, :payee_id, :company_id, :bank_code, :agency_digit, :agency, :account, :account_digit] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/SymbolArray: Use %i or %I for an array of symbols.
Metrics/LineLength: Line is too long. [130/120]
it_behaves_like "entity_attributes", [:id, :payee_id, :bank_code, :agency_digit, :agency, :account, :account_digit] | ||
describe '#payee_id' do | ||
it 'print a deprecation warning' do | ||
expect { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/BlockDelimiters: Avoid using {...} for multi-line blocks.
@@ -14,5 +15,13 @@ | |||
|
|||
subject { described_class.new(attributes) } | |||
|
|||
it_behaves_like "entity_attributes", [:id, :payee_id, :bank_code, :agency_digit, :agency, :account, :account_digit] | |||
describe '#payee_id' do | |||
it 'print a deprecation warning' do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
@@ -14,5 +15,13 @@ | |||
|
|||
subject { described_class.new(attributes) } | |||
|
|||
it_behaves_like "entity_attributes", [:id, :payee_id, :bank_code, :agency_digit, :agency, :account, :account_digit] | |||
describe '#payee_id' do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
Story details: https://app.clubhouse.io/nexaas/story/23789