Skip to content
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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

icaroang
Copy link
Contributor

@icaroang icaroang added the wip label Sep 20, 2019
@icaroang icaroang self-assigned this Sep 20, 2019
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'])

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"})

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

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"

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]

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"

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.

end
end
end
end

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

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.

attribute :street, String
end
end
end

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

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,

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 {

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

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

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 {

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

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

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 {

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

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

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.

@icaroang icaroang changed the title [WIP] Add company to client Add company to client Sep 20, 2019
@icaroang icaroang assigned icaroang and unassigned icaroang Sep 20, 2019
@icaroang icaroang requested a review from jcomello September 20, 2019 21:42
@icaroang icaroang added review and removed wip labels Sep 20, 2019
describe "#update" do
it "returns a Company instance updated" do
VCR.use_cassette("companies/update/success") do
company = subject.update(227, { name: "RSpec integration" })

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"

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]

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"

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]

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 {

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

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

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants