-
Notifications
You must be signed in to change notification settings - Fork 6
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
Feature/move receipt routes #147
Conversation
|
||
context 'without an existing item' do | ||
it 'should create the item and add it to the grocery list with the correct price' do | ||
name = 'Bacon' |
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.
Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
end | ||
|
||
context 'without an existing item' do | ||
it 'should create the item and add it to the grocery list with the correct price' 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.
Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
Line is too long. [90/80]
end | ||
end | ||
|
||
context 'without an existing item' 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.
Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
end | ||
|
||
context 'with the item not on the grocery list' do | ||
it 'should add the item to the list with the correct price' 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.
Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
end | ||
end | ||
|
||
context 'with the item not on the grocery list' 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.
Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
let(:name) { 'Bacon' } | ||
let(:item) { create(:item, name: name) } | ||
context 'with the item on the grocery list' do | ||
it 'should set the price of the item to the match price' 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.
Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
context 'with an existing item' do | ||
let(:name) { 'Bacon' } | ||
let(:item) { create(:item, name: name) } | ||
context 'with the item on the grocery list' 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.
Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
end | ||
|
||
context 'with an existing item' do | ||
let(:name) { 'Bacon' } |
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.
Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
}.with_indifferent_access) | ||
end | ||
|
||
context 'with an existing item' 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.
Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
{ | ||
matches: [ | ||
{ | ||
name: 'Bacon', |
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.
Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
end | ||
end | ||
|
||
describe 'POST confirm' 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.
Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
expect(results['total']).to eq 10.40 | ||
expect(results['matches'].map! { |match| match.slice('name', 'price') }).to eq expected_matches | ||
expect(matches['total']).to eq 10.40 | ||
expect(matches['list'].map! { |match| match.slice('name', 'price') }).to eq expected_matches |
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.
Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
Line is too long. [100/80]
|
||
expect(results['total']).to eq 10.40 | ||
expect(results['matches'].map! { |match| match.slice('name', 'price') }).to eq expected_matches | ||
expect(matches['total']).to eq 10.40 |
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.
Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
expect(results['total']).to eq 44.45 | ||
expect(results['matches'].map! { |match| match.slice('name', 'price') }).to eq expected_matches | ||
expect(matches['total']).to eq 44.45 | ||
expect(matches['list'].map! { |match| match.slice('name', 'price') }).to eq expected_matches |
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.
Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
Line is too long. [100/80]
|
||
expect(results['total']).to eq 44.45 | ||
expect(results['matches'].map! { |match| match.slice('name', 'price') }).to eq expected_matches | ||
expect(matches['total']).to eq 44.45 |
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.
Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
expect(results['total']).to eq 0 | ||
expect(results['matches'].map! { |match| match.slice('name', 'price', 'new') }).to eq expected_matches | ||
expect(matches['total']).to eq 0 | ||
expect(matches['list'].map! { |match| match.slice('name', 'price', 'new') }).to eq expected_matches |
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.
Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
Line is too long. [107/80]
Feature/move receipt routes
No description provided.