Add LndHub service, lnurl-pay endpoints
Enables the lnurl-pay payment workflow
This commit is contained in:
15
spec/helpers/lnurlpay_helper_spec.rb
Normal file
15
spec/helpers/lnurlpay_helper_spec.rb
Normal file
@@ -0,0 +1,15 @@
|
||||
require 'rails_helper'
|
||||
|
||||
# Specs in this file have access to a helper object that includes
|
||||
# the LnurlpayHelper. For example:
|
||||
#
|
||||
# describe LnurlpayHelper do
|
||||
# describe "string concat" do
|
||||
# it "concats two strings with spaces" do
|
||||
# expect(helper.concat_strings("this","that")).to eq("this that")
|
||||
# end
|
||||
# end
|
||||
# end
|
||||
RSpec.describe LnurlpayHelper, type: :helper do
|
||||
pending "add some examples to (or delete) #{__FILE__}"
|
||||
end
|
||||
@@ -16,7 +16,7 @@ RSpec.describe CreateLndhubWalletJob, type: :job do
|
||||
perform_enqueued_jobs { job }
|
||||
|
||||
expect(WebMock).to have_requested(:post, "http://10.1.1.163:3023/create")
|
||||
.with { |req| req.body == '{"partnerid":"bluewallet","accounttype":"common"}' }
|
||||
.with { |req| req.body == '{"partnerid":"kosmos.org","accounttype":"user"}' }
|
||||
|
||||
user.reload
|
||||
expect(user.ln_login).to eq("abc123")
|
||||
|
||||
7
spec/requests/lnurlpay_spec.rb
Normal file
7
spec/requests/lnurlpay_spec.rb
Normal file
@@ -0,0 +1,7 @@
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe "Lnurlpays", type: :request do
|
||||
describe "GET /index" do
|
||||
pending "add some examples (or delete) #{__FILE__}"
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user