Make publishing of BTCPay wallet balances optional
This commit is contained in:
@@ -39,6 +39,18 @@ RSpec.describe "/api/btcpay", type: :request do
|
||||
expect(res["error"]).not_to be_nil
|
||||
end
|
||||
end
|
||||
|
||||
context "feature disabled" do
|
||||
before do
|
||||
Setting.btcpay_publish_wallet_balances = false
|
||||
end
|
||||
|
||||
it "returns a 404 status" do
|
||||
get api_btcpay_onchain_btc_balance_path
|
||||
|
||||
expect(response).to have_http_status(:not_found)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe "GET /lightning_btc_balance" do
|
||||
@@ -75,5 +87,17 @@ RSpec.describe "/api/btcpay", type: :request do
|
||||
expect(res["error"]).not_to be_nil
|
||||
end
|
||||
end
|
||||
|
||||
context "feature disabled" do
|
||||
before do
|
||||
Setting.btcpay_publish_wallet_balances = false
|
||||
end
|
||||
|
||||
it "returns a 404 status" do
|
||||
get api_btcpay_lightning_btc_balance_path
|
||||
|
||||
expect(response).to have_http_status(:not_found)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user