* Removing the stackbit integration The feature didn't quite work and Stackbit no longer supports this integration. Yes there are a few places where the webhooks has a string of "stackbit" but I'm hesitant to remove that, as they are the part of the Webhooks tests. Closes #15700 * Update lib/data_update_scripts/20211206222716_remove_stackbit_page.rb Co-authored-by: Michael Kohl <citizen428@forem.com> Co-authored-by: Michael Kohl <citizen428@forem.com>
50 lines
1.4 KiB
Ruby
50 lines
1.4 KiB
Ruby
require "rails_helper"
|
|
|
|
RSpec.describe "User edits their extensions", type: :system, js: true do
|
|
let(:user) { create(:user) }
|
|
let(:github_response_body) do
|
|
[
|
|
{
|
|
"id" => 1_296_269,
|
|
"node_id" => "MDEwOlJlcG9zaXRvcnkxMjk2MjY5",
|
|
"name" => "Hello-World",
|
|
"full_name" => "octocat/Hello-World"
|
|
},
|
|
]
|
|
end
|
|
|
|
before do
|
|
sign_in user
|
|
stub_request(:get, "https://api.github.com/user/repos?per_page=100")
|
|
.to_return(status: 200, body: github_response_body.to_json, headers: { "Content-Type" => "application/json" })
|
|
end
|
|
|
|
describe "Feed" do
|
|
before do
|
|
visit user_settings_path(:extensions)
|
|
end
|
|
|
|
it "fails if the feed URL is invalid" do
|
|
stub_request(:get, "https://medium.com/feed/alkdmksadksa")
|
|
.to_return(status: 200, body: "not an xml feed")
|
|
|
|
fill_in "users_setting[feed_url]", with: "https://medium.com/feed/alkdmksadksa"
|
|
click_on "Submit Feed Settings"
|
|
|
|
expect(page).to have_text("Feed url is not a valid RSS/Atom feed")
|
|
end
|
|
end
|
|
|
|
describe "PaymentPointer" do
|
|
before do
|
|
visit user_settings_path(:extensions)
|
|
end
|
|
|
|
it "fails if the payment pointer is invalid" do
|
|
fill_in "user[payment_pointer]", with: "invalid_example/value"
|
|
click_on "Save Web Monetization Settings"
|
|
|
|
expect(page).to have_text("Payment pointer is invalid")
|
|
end
|
|
end
|
|
end
|