Skip to content

Commit

Permalink
More tests in suite
Browse files Browse the repository at this point in the history
  • Loading branch information
pedrofurtado committed Jun 24, 2021
1 parent 957908d commit e64bffb
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
4 changes: 3 additions & 1 deletion lib/qrcode_pix_ruby/payload.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# frozen_string_literal: true

require 'rqrcode'

module QrcodePixRuby
class Payload
ID_PAYLOAD_FORMAT_INDICATOR = '00'.freeze
Expand Down Expand Up @@ -49,7 +51,7 @@ def payload
end

def base64
''
::RQRCode::QRCode.new(payload).as_png(bit_depth: 1, border_modules: 0, color_mode: 0, color: 'black', file: nil, fill: 'white', module_px_size: 6, resize_exactly_to: false, resize_gte_to: false, size: 200).to_data_url
end

private
Expand Down
1 change: 1 addition & 0 deletions qrcode_pix_ruby.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,5 @@ Gem::Specification.new do |spec|

spec.add_dependency 'rake', '~> 13.0'
spec.add_dependency 'rspec', '~> 3.0'
spec.add_dependency 'rqrcode', '~> 2.0'
end
5 changes: 4 additions & 1 deletion spec/qrcode_pix_ruby_spec.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# frozen_string_literal: true

RSpec.describe QrcodePixRuby do
it 'QRCode - Base64'
it 'QRCode - Base64' do
pix = QrcodePixRuby::Payload.new
expect(pix.base64).to eq ''
end

it 'QRCode - Payload - 01 - Basic' do
pix = QrcodePixRuby::Payload.new
Expand Down

0 comments on commit e64bffb

Please sign in to comment.