Implement bitcoin donations via BTCPay
This commit is contained in:
35
spec/features/contributions/donations_spec.rb
Normal file
35
spec/features/contributions/donations_spec.rb
Normal file
@@ -0,0 +1,35 @@
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe 'Donations page', type: :feature do
|
||||
let(:user) { create :user }
|
||||
|
||||
before do
|
||||
login_as user, :scope => :user
|
||||
end
|
||||
|
||||
describe "Donation methods" do
|
||||
scenario "Only BTCPay enabled" do
|
||||
Setting.btcpay_enabled = true
|
||||
Setting.lndhub_enabled = false
|
||||
Setting.opencollective_enabled = false
|
||||
visit contributions_donations_url
|
||||
|
||||
within ".donation-methods" do
|
||||
expect(page).to have_content("Bitcoin")
|
||||
expect(page).not_to have_content("OpenCollective")
|
||||
end
|
||||
end
|
||||
|
||||
scenario "Only OpenCollective enabled" do
|
||||
Setting.btcpay_enabled = false
|
||||
Setting.lndhub_enabled = false
|
||||
Setting.opencollective_enabled = true
|
||||
visit contributions_donations_url
|
||||
|
||||
within ".donation-methods" do
|
||||
expect(page).not_to have_content("Bitcoin")
|
||||
expect(page).to have_content("OpenCollective")
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user