source stringclasses 1
value | repo stringlengths 5 63 | repo_url stringlengths 24 82 | path stringlengths 5 167 | language stringclasses 1
value | license stringclasses 5
values | stars int64 10 51.4k | ref stringclasses 23
values | size_bytes int64 200 258k | text stringlengths 137 258k |
|---|---|---|---|---|---|---|---|---|---|
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/support/factories/australian_bank_accounts.rb | Ruby | mit | 8,966 | main | 263 | # frozen_string_literal: true
FactoryBot.define do
factory :australian_bank_account do
user
account_number { "1234567" }
bsb_number { "062111" }
account_number_last_four { "4567" }
account_holder_full_name { "Gumbot Gumstein I" }
end
end |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/support/factories/hong_kong_bank_accounts.rb | Ruby | mit | 8,966 | main | 288 | # frozen_string_literal: true
FactoryBot.define do
factory :hong_kong_bank_account do
user
account_number { "000123456" }
branch_code { "000" }
bank_number { "110" }
account_number_last_four { "3456" }
account_holder_full_name { "Gumbot Gumstein I" }
end
end |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/support/factories/card_bank_accounts.rb | Ruby | mit | 8,966 | main | 233 | # frozen_string_literal: true
FactoryBot.define do
factory :card_bank_account do
user
credit_card { create(:credit_card, chargeable: create(:cc_token_chargeable, card: CardParamsSpecHelper.success_debit_visa)) }
end
end |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/support/factories/senegal_bank_accounts.rb | Ruby | mit | 8,966 | main | 253 | # frozen_string_literal: true
FactoryBot.define do
factory :senegal_bank_account do
user
account_number { "SN08SN0100152000048500003035" }
account_number_last_four { "3035" }
account_holder_full_name { "Gumbot Gumstein I" }
end
end |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/support/factories/subscriptions.rb | Ruby | mit | 8,966 | main | 1,975 | # frozen_string_literal: true
FactoryBot.define do
factory :subscription do
association :link, factory: :product
user
is_installment_plan { false }
transient do
price { nil }
purchase_email { nil }
end
before(:create) do |subscription, evaluator|
if subscription.is_install... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/support/factories/installment_rules.rb | Ruby | mit | 8,966 | main | 202 | # frozen_string_literal: true
FactoryBot.define do
factory :installment_rule, aliases: [:post_rule] do
installment
to_be_published_at { 1.week.from_now }
time_period { "hour" }
end
end |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/support/factories/signup_events.rb | Ruby | mit | 8,966 | main | 448 | # frozen_string_literal: true
FactoryBot.define do
factory :signup_event do
event_name { "signup" }
from_profile { false }
ip_country { "United States" }
ip_state { "CA" }
after(:build) do |event|
event.referrer_domain = Referrer.extract_domain(event.referrer) if event.referrer.present?
... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/support/factories/rwanda_bank_accounts.rb | Ruby | mit | 8,966 | main | 266 | # frozen_string_literal: true
FactoryBot.define do
factory :rwanda_bank_account do
user
account_number { "000123456789" }
account_number_last_four { "6789" }
bank_code { "AAAARWRWXXX" }
account_holder_full_name { "Rwandan Creator" }
end
end |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/support/factories/events.rb | Ruby | mit | 8,966 | main | 1,009 | # frozen_string_literal: true
FactoryBot.define do
factory :event do
from_profile { false }
ip_country { "United States" }
ip_state { "CA" }
after(:build) do |event|
event.referrer_domain = Referrer.extract_domain(event.referrer) if event.referrer.present?
event.referrer_domain = REFERRE... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/support/factories/media_locations.rb | Ruby | mit | 8,966 | main | 435 | # frozen_string_literal: true
FactoryBot.define do
factory :media_location do
product_id { create(:product).id }
product_file_id { create(:product_file, url: "#{AWS_S3_ENDPOINT}/#{S3_BUCKET}/specs/billion-dollar-company-chapter-0.pdf").id }
url_redirect_id { create(:url_redirect).id }
purchase_id { c... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/support/factories/north_macedonia_bank_accounts.rb | Ruby | mit | 8,966 | main | 284 | # frozen_string_literal: true
FactoryBot.define do
factory :north_macedonia_bank_account do
user
account_number { "MK49250120000058907" }
account_number_last_four { "8907" }
account_holder_full_name { "Gumbot Gumstein I" }
bank_code { "AAAAMK2XXXX" }
end
end |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/support/factories/circle_integrations.rb | Ruby | mit | 8,966 | main | 205 | # frozen_string_literal: true
FactoryBot.define do
factory :circle_integration do
api_key { GlobalConfig.get("CIRCLE_API_KEY") }
community_id { "3512" }
space_group_id { "43576" }
end
end |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/support/factories/laos_bank_accounts.rb | Ruby | mit | 8,966 | main | 261 | # frozen_string_literal: true
FactoryBot.define do
factory :laos_bank_account do
user
account_number { "000123456789" }
account_number_last_four { "6789" }
bank_code { "AAAALALAXXX" }
account_holder_full_name { "Laos Creator" }
end
end |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/support/factories/comment.rb | Ruby | mit | 8,966 | main | 331 | # frozen_string_literal: true
FactoryBot.define do
factory :comment do
association :commentable, factory: :published_installment
association :author, factory: :user
author_name { author.display_name }
comment_type { Comment::COMMENT_TYPE_USER_SUBMITTED }
content { Faker::Quote.famous_last_words }... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/support/factories/product_files_archives.rb | Ruby | mit | 8,966 | main | 348 | # frozen_string_literal: true
FactoryBot.define do
factory :product_files_archive do
association :link, factory: :product
after(:create) do |pfa|
pfa.set_url_if_not_present
pfa.save!
end
end
factory :product_files_archive_without_url, class: ProductFilesArchive do
association :link, ... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/support/factories/payments.rb | Ruby | mit | 8,966 | main | 758 | # frozen_string_literal: true
FactoryBot.define do
factory :payment do
user
state { "processing" }
processor { PayoutProcessorType::PAYPAL }
correlation_id { "12345" }
amount_cents { 150 }
payout_period_end_date { Date.yesterday }
end
factory :payment_unclaimed, parent: :payment do
s... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/support/factories/product_review_responses.rb | Ruby | mit | 8,966 | main | 202 | # frozen_string_literal: true
FactoryBot.define do
factory :product_review_response do
product_review
user { product_review.purchase.seller }
message { Faker::Lorem.paragraph }
end
end |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/support/factories/trinidad_and_tobago_bank_accounts.rb | Ruby | mit | 8,966 | main | 308 | # frozen_string_literal: true
FactoryBot.define do
factory :trinidad_and_tobago_bank_account do
user
account_number { "00567890123456789" }
bank_number { "999" }
branch_code { "00001" }
account_number_last_four { "6789" }
account_holder_full_name { "Gumbot Gumstein I" }
end
end |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/support/factories/product_affiliates.rb | Ruby | mit | 8,966 | main | 210 | # frozen_string_literal: true
FactoryBot.define do
factory :product_affiliate do
association :product
association :affiliate, factory: :direct_affiliate
affiliate_basis_points { 1000 }
end
end |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/support/factories/team_invitations.rb | Ruby | mit | 8,966 | main | 282 | # frozen_string_literal: true
FactoryBot.define do
factory :team_invitation do
association :seller, factory: :user
email { generate(:fixed_email) }
expires_at { TeamInvitation::ACTIVE_INTERVAL_IN_DAYS.days.from_now }
role { TeamMembership::ROLE_ADMIN }
end
end |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/support/factories/madagascar_bank_accounts.rb | Ruby | mit | 8,966 | main | 287 | # frozen_string_literal: true
FactoryBot.define do
factory :madagascar_bank_account do
user
account_number { "MG4800005000011234567890123" }
account_number_last_four { "0123" }
bank_code { "AAAAMGMGXXX" }
account_holder_full_name { "Gumbot Gumstein I" }
end
end |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/support/factories/purchase_integrations.rb | Ruby | mit | 8,966 | main | 474 | # frozen_string_literal: true
FactoryBot.define do
factory :purchase_integration do
purchase { create(:purchase) }
integration { create(:circle_integration) }
before(:create) do |purchase_integration|
purchase_integration.purchase.link.active_integrations |= [purchase_integration.integration]
... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/support/factories/korea_bank_accounts.rb | Ruby | mit | 8,966 | main | 269 | # frozen_string_literal: true
FactoryBot.define do
factory :korea_bank_account do
user
account_number { "000123456789" }
bank_number { "SGSEKRSLXXX" }
account_number_last_four { "6789" }
account_holder_full_name { "Gumbot Gumstein I" }
end
end |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/support/factories/thumbnails.rb | Ruby | mit | 8,966 | main | 677 | # frozen_string_literal: true
FactoryBot.define do
factory :thumbnail do
product { create(:product) }
before(:create) do |thumbnail|
blob = ActiveStorage::Blob.create_and_upload!(io: Rack::Test::UploadedFile.new(Rails.root.join("spec", "support", "fixtures", "smilie.png"), "image/png"), filename: "smil... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/support/factories/followers.rb | Ruby | mit | 8,966 | main | 277 | # frozen_string_literal: true
FactoryBot.define do
factory :follower do
user
email { generate :email }
factory :active_follower do
confirmed_at { Time.current }
end
factory :deleted_follower do
deleted_at { Time.current }
end
end
end |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/support/factories/imported_customers.rb | Ruby | mit | 8,966 | main | 225 | # frozen_string_literal: true
FactoryBot.define do
factory :imported_customer do
association :importing_user, factory: :user
email { generate :email }
purchase_date { Time.current }
link_id { 1 }
end
end |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/support/factories/antigua_and_barbuda_bank_accounts.rb | Ruby | mit | 8,966 | main | 293 | # frozen_string_literal: true
FactoryBot.define do
factory :antigua_and_barbuda_bank_account do
user
account_number { "000123456789" }
account_number_last_four { "6789" }
bank_code { "AAAAAGAGXYZ" }
account_holder_full_name { "Antigua and Barbuda Creator I" }
end
end |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/support/factories/zoom_integrations.rb | Ruby | mit | 8,966 | main | 227 | # frozen_string_literal: true
FactoryBot.define do
factory :zoom_integration do
user_id { "0" }
email { "test@zoom.com" }
access_token { "test_access_token" }
refresh_token { "test_refresh_token" }
end
end |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/support/factories/ecuador_bank_accounts.rb | Ruby | mit | 8,966 | main | 270 | # frozen_string_literal: true
FactoryBot.define do
factory :ecuador_bank_account do
user
account_number { "000123456789" }
account_number_last_four { "6789" }
bank_code { "AAAAECE1XXX" }
account_holder_full_name { "Ecuadorian Creator" }
end
end |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/support/factories/call_limitation_infos.rb | Ruby | mit | 8,966 | main | 202 | # frozen_string_literal: true
FactoryBot.define do
factory :call_limitation_info do
call { create(:call_product) }
minimum_notice_in_minutes { 60 }
maximum_calls_per_day { 10 }
end
end |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/support/factories/brunei_bank_accounts.rb | Ruby | mit | 8,966 | main | 266 | # frozen_string_literal: true
FactoryBot.define do
factory :brunei_bank_account do
user
account_number { "0000123456789" }
account_number_last_four { "6789" }
bank_code { "AAAABNBBXXX" }
account_holder_full_name { "Brunei Creator" }
end
end |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/support/factories/subtitle_files.rb | Ruby | mit | 8,966 | main | 204 | # frozen_string_literal: true
FactoryBot.define do
factory :subtitle_file do
product_file
url { "#{AWS_S3_ENDPOINT}/#{S3_BUCKET}/#{SecureRandom.hex}.srt" }
language { "English" }
end
end |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/support/factories/egypt_bank_accounts.rb | Ruby | mit | 8,966 | main | 284 | # frozen_string_literal: true
FactoryBot.define do
factory :egypt_bank_account do
user
account_number { "EG800002000156789012345180002" }
account_number_last_four { "1111" }
bank_code { "NBEGEGCX331" }
account_holder_full_name { "Gumbot Gumstein I" }
end
end |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/support/factories/payment_options.rb | Ruby | mit | 8,966 | main | 257 | # frozen_string_literal: true
FactoryBot.define do
factory :payment_option do
subscription
after(:build) do |payment_option|
product = payment_option.subscription.link
payment_option.price ||= product.default_price
end
end
end |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/support/factories/monaco_bank_accounts.rb | Ruby | mit | 8,966 | main | 251 | # frozen_string_literal: true
FactoryBot.define do
factory :monaco_bank_account do
user
account_number { "MC5810096180790123456789085" }
account_number_last_four { "9085" }
account_holder_full_name { "Gumbot Gumstein I" }
end
end |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/support/factories/botswana_bank_accounts.rb | Ruby | mit | 8,966 | main | 269 | # frozen_string_literal: true
FactoryBot.define do
factory :botswana_bank_account do
user
account_number { "000123456789" }
account_number_last_four { "6789" }
bank_code { "AAAABWBWXXX" }
account_holder_full_name { "Botswana Creator" }
end
end |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/support/factories/subscription_plan_changes.rb | Ruby | mit | 8,966 | main | 222 | # frozen_string_literal: true
FactoryBot.define do
factory :subscription_plan_change do
subscription
association :tier, factory: :variant
recurrence { "monthly" }
perceived_price_cents { 500 }
end
end |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/support/factories/seller_profile_subscribe_sections.rb | Ruby | mit | 8,966 | main | 205 | # frozen_string_literal: true
FactoryBot.define do
factory :seller_profile_subscribe_section do
seller { create(:user) }
header { "Subscribe to me!" }
button_label { "Subscribe" }
end
end |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/support/factories/bosnia_and_herzegovina_bank_accounts.rb | Ruby | mit | 8,966 | main | 307 | # frozen_string_literal: true
FactoryBot.define do
factory :bosnia_and_herzegovina_bank_account do
user
account_number { "BA095520001234567812" }
account_number_last_four { "7812" }
bank_code { "AAAABABAXXX" }
account_holder_full_name { "Bosnia and Herzegovina Creator I" }
end
end |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/support/factories/merchant_accounts.rb | Ruby | mit | 8,966 | main | 3,258 | # frozen_string_literal: true
FactoryBot.define do
sequence :merchant_account_id do |n|
n.to_s.rjust(9, "0")
end
factory :merchant_account, class: MerchantAccount do
user
charge_processor_id { StripeChargeProcessor.charge_processor_id }
charge_processor_merchant_id { generate(:merchant_account_i... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/support/factories/bundle_product_purchases.rb | Ruby | mit | 8,966 | main | 271 | # frozen_string_literal: true
FactoryBot.define do
factory :bundle_product_purchase do
bundle_purchase { create(:purchase) }
product_purchase { create(:purchase, link: create(:product, user: bundle_purchase.seller), seller: bundle_purchase.seller) }
end
end |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/support/factories/disputes.rb | Ruby | mit | 8,966 | main | 836 | # frozen_string_literal: true
FactoryBot.define do
factory :dispute do
purchase
event_created_at { Time.current }
end
factory :dispute_on_charge, parent: :dispute do
purchase { nil }
charge
end
factory :dispute_formalized, parent: :dispute do
reason { Dispute::REASON_FRAUDULENT }
st... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/support/factories/canadian_bank_accounts.rb | Ruby | mit | 8,966 | main | 297 | # frozen_string_literal: true
FactoryBot.define do
factory :canadian_bank_account do
user
account_number { "1234567" }
transit_number { "12345" }
institution_number { "123" }
account_number_last_four { "4567" }
account_holder_full_name { "Gumbot Gumstein I" }
end
end |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/support/factories/bulgaria_bank_accounts.rb | Ruby | mit | 8,966 | main | 248 | # frozen_string_literal: true
FactoryBot.define do
factory :bulgaria_bank_account do
user
account_number { "BG80BNBG96611020345678" }
account_number_last_four { "2874" }
account_holder_full_name { "Gumbot Gumstein I" }
end
end |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/support/factories/oauth_applications.rb | Ruby | mit | 8,966 | main | 412 | # frozen_string_literal: true
FactoryBot.define do
factory :oauth_application do
sequence(:name) { |n| "app#{n}" }
redirect_uri { "https://foo" }
association :owner, factory: :user
factory :oauth_application_valid do
factory :oauth_application_with_link do
after(:create) { |oauth_applic... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/support/factories/affiliate_request.rb | Ruby | mit | 8,966 | main | 226 | # frozen_string_literal: true
FactoryBot.define do
factory :affiliate_request do
association :seller, factory: :user
email { generate :email }
name { "John Doe" }
promotion_text { "Hello there!" }
end
end |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/oauth_applications_pages_spec.rb | Ruby | mit | 8,966 | main | 5,664 | # frozen_string_literal: true
require("spec_helper")
describe "OauthApplicationsPages", type: :system, js: true do
context "On /settings/advanced page" do
let(:user) { create(:named_user) }
before do
login_as user
visit settings_advanced_path
end
it "creates an OAuth application with c... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/acme_challenges_spec.rb | Ruby | mit | 8,966 | main | 1,703 | # frozen_string_literal: true
require "spec_helper"
describe "ACME Challenges", type: :request do
let(:token) { "a" * 43 }
let(:challenge_content) { "challenge-response-content" }
describe "GET /.well-known/acme-challenge/:token" do
context "when request is from a user custom domain" do
let(:user) { ... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/devise_auth_redirects_spec.rb | Ruby | mit | 8,966 | main | 1,681 | # frozen_string_literal: true
require "spec_helper"
describe "Devise auth path redirects", type: :request do
include Devise::Test::IntegrationHelpers
before do
allow_any_instance_of(ActionDispatch::Request).to receive(:host).and_return(VALID_REQUEST_HOSTS.first)
end
describe "GET /users/sign_in" do
... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/dashboard_nav_mobile_spec.rb | Ruby | mit | 8,966 | main | 544 | # frozen_string_literal: true
require "spec_helper"
describe("Dashboard - Nav - Mobile", :js, :mobile_view, type: :system) do
let(:user) { create(:named_seller) }
before do
login_as user
end
it "auto closes the menu when navigating to a different page" do
visit dashboard_path
click_on "Toggle n... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/dashboard_spec.rb | Ruby | mit | 8,966 | main | 8,940 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/authorize_called"
describe "Dashboard", js: true, type: :system do
let(:seller) { create(:named_seller) }
before do
login_as seller
end
describe "dashboard stats" do
before do
create(:product, user: seller)
allo... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/video_streaming_spec.rb | Ruby | mit | 8,966 | main | 12,111 | # frozen_string_literal: true
require("spec_helper")
describe "Video stream scenario", type: :system, js: true do
before do
@url_redirect = create(:streamable_url_redirect)
@product = @url_redirect.referenced_link
login_as(@url_redirect.purchase.purchaser)
Link.import(refresh: true)
end
describ... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/widget_spec.rb | Ruby | mit | 8,966 | main | 11,510 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/authorize_called"
describe "Widget Page scenario", js: true, type: :system do
context "when no user is logged in" do
before do
@demo_product = create(:product, user: create(:named_user), unique_permalink: "demo")
end
it ... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/workflows_spec.rb | Ruby | mit | 8,966 | main | 83,739 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/authorize_called"
require "shared_examples/creator_dashboard_page"
describe("Workflows", js: true, type: :system) do
include PostHelpers
def find_email_row(name)
find("[aria-label='Email'] h3", text: name, exact_text: true).ancestor... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/product_custom_domain_spec.rb | Ruby | mit | 8,966 | main | 3,023 | # frozen_string_literal: true
require "spec_helper"
describe "ProductCustomDomainScenario", type: :system, js: true do
let(:product) { create(:product) }
let(:custom_domain) { create(:custom_domain, domain: "test-custom-domain.gumroad.com", user: nil, product:) }
let(:port) { Capybara.current_session.server.por... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/main_navigation_spec.rb | Ruby | mit | 8,966 | main | 3,222 | # frozen_string_literal: true
require "spec_helper"
describe "Main Navigation", type: :system, js: true do
context "with logged in user" do
let(:user) { create(:user, name: "Gum") }
before do
login_as user
end
it "renders all menu links" do
visit library_path
within "nav[aria-la... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/tax_center_spec.rb | Ruby | mit | 8,966 | main | 2,670 | # frozen_string_literal: true
require "spec_helper"
describe "Tax Center", js: true, type: :system do
let(:seller_created_at) { Date.new(4.years.ago.year, 6, 15) }
let(:seller) { create(:user, created_at: seller_created_at) }
before do
create(:user_compliance_info, user: seller)
Feature.activate_user(:... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/reading_spec.rb | Ruby | mit | 8,966 | main | 11,096 | # frozen_string_literal: true
require("spec_helper")
describe "Reading Scenario", type: :system, js: true do
before do
@url_redirect = create(:readable_url_redirect)
@product = @url_redirect.referenced_link
login_as(@url_redirect.purchase.purchaser)
Link.import(refresh: true)
end
describe "read... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/account_confirmation_spec.rb | Ruby | mit | 8,966 | main | 4,191 | # frozen_string_literal: true
require "spec_helper"
describe "Account Confirmation", js: true, type: :system do
let(:user) { create(:user) }
it "confirms the unconfirmed email and signs out from all other active sessions" do
session_1 = :session_1
session_2 = :session_2
Capybara.using_session(sessio... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/secure_redirect_spec.rb | Ruby | mit | 8,966 | main | 4,556 | # frozen_string_literal: true
require "spec_helper"
describe("Secure Redirect", js: true, type: :system) do
let(:user) { create(:user) }
let(:destination_url) { api_url(host: UrlService.domain_with_protocol) }
let(:confirmation_text_1) { "example@example.com" }
let(:confirmation_text_2) { user.email }
let(:... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/authentication_spec.rb | Ruby | mit | 8,966 | main | 4,881 | # frozen_string_literal: true
require("spec_helper")
describe("Authentication Scenario", type: :system, js: true) do
include FillInUserProfileHelpers
before(:each) do
create(:user)
end
describe("when user is not logged in") do
it "prevents signing up with a compromised password" do
visit("/sig... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/help_center_spec.rb | Ruby | mit | 8,966 | main | 3,334 | # frozen_string_literal: true
require "spec_helper"
describe "Help Center", type: :system, js: true do
let(:seller) { create(:named_seller) }
before do
allow(GlobalConfig).to receive(:get).with("RECAPTCHA_LOGIN_SITE_KEY")
allow(GlobalConfig).to receive(:get).with("ENTERPRISE_RECAPTCHA_API_KEY")
allow... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/catch_bad_request_errors_spec.rb | Ruby | mit | 8,966 | main | 1,202 | # frozen_string_literal: true
require "spec_helper"
describe "CatchBadRequestErrors middleware" do
let!(:user) { create(:user) }
let!(:oauth_application) { create(:oauth_application, owner: user) }
context "when a request contains invalid params" do
it "returns 400 (Bad Request) response" do
post oau... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/oauth_authorizations_spec.rb | Ruby | mit | 8,966 | main | 4,021 | # frozen_string_literal: true
require("spec_helper")
describe Oauth::AuthorizationsController, type: :system do
before :each do
visit "/"
stub_const("DOMAIN", "gumroad.com")
stub_const("VALID_REQUEST_HOSTS", ["gumroad.com"])
@user = create(:named_user)
@owner = create(:named_user)
@app = cre... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/two_factor_authentication_request_spec.rb | Ruby | mit | 8,966 | main | 1,351 | # frozen_string_literal: true
require "spec_helper"
describe "Two-Factor Authentication endpoint", type: :request do
let(:user) { create(:user) }
before do
allow_any_instance_of(ActionDispatch::Request).to receive(:host).and_return(VALID_REQUEST_HOSTS.first)
allow_any_instance_of(TwoFactorAuthenticationC... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/rack_attack_spec.rb | Ruby | mit | 8,966 | main | 597 | # frozen_string_literal: true
require "spec_helper"
describe "Rack::Attack throttle", type: :request do
before do
allow_any_instance_of(ActionDispatch::Request).to receive(:host).and_return(VALID_REQUEST_HOSTS.first)
end
describe "forgot_password throttle with malformed JSON params" do
it "does not rai... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/communities_spec.rb | Ruby | mit | 8,966 | main | 30,219 | # frozen_string_literal: true
require "spec_helper"
describe "Communities", :js, type: :system do
let(:seller) { create(:user, name: "Bob") }
before do
Feature.activate_user(:communities, seller)
end
def find_message(content)
content_element = find("[aria-label='Message content']", text: content, ma... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/cors_headers_spec.rb | Ruby | mit | 8,966 | main | 1,704 | # frozen_string_literal: true
require "spec_helper"
describe "CORS support" do
let(:application_domain) { "gumroad.com" }
let(:origin_domain) { "example.com" }
describe "Request to API domain" do
let(:api_domain) { "api.gumroad.com" }
before do
stub_const("VALID_API_REQUEST_HOSTS", [api_domain])... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/commissions_spec.rb | Ruby | mit | 8,966 | main | 1,528 | # frozen_string_literal: true
require "spec_helper"
describe "Commissions", type: :system, js: true do
let(:seller) { create(:user, :eligible_for_service_products) }
let(:commission1) { create(:product, user: seller, name: "Commission 1", native_type: Link::NATIVE_TYPE_COMMISSION, price_cents: 200) }
let(:commi... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/collaborators_spec.rb | Ruby | mit | 8,966 | main | 25,595 | # frozen_string_literal: true
require "spec_helper"
describe "Collaborators", type: :system, js: true do
describe "seller view" do
let(:seller) { create(:user) }
before { login_as seller }
context "viewing collaborators" do
context "when there are none" do
it "displays a placeholder messa... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/mobile_api_spec.rb | Ruby | mit | 8,966 | main | 4,054 | # frozen_string_literal: true
describe "Mobile API Request Specs" do
before do
@product = create(:product)
end
describe "product download urls" do
before do
base_url = "#{AWS_S3_ENDPOINT}/#{S3_BUCKET}/attachments/43a5363194e74e9ee75b6203eaea6705/original/chapter1.mp4"
@product.product_files ... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/affiliates_spec.rb | Ruby | mit | 8,966 | main | 42,308 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/authorize_called"
describe "Affiliates", type: :system, js: true do
it "redirects to the product page and applies discount based on the offer_code parameter in the query string" do
user = create(:user)
product = create(:product, us... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/library_spec.rb | Ruby | mit | 8,966 | main | 34,194 | # frozen_string_literal: true
require "spec_helper"
describe("Library Scenario", type: :system, js: true) do
include ManageSubscriptionHelpers
before :each do
@user = create(:named_user)
login_as @user
allow_any_instance_of(Aws::S3::Object).to receive(:content_length).and_return(1_000_000)
end
d... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/collaborations_spec.rb | Ruby | mit | 8,966 | main | 5,598 | # frozen_string_literal: true
require "spec_helper"
describe "Collaborations", type: :system, js: true do
let(:seller_1) { create(:user) }
let(:seller_2) { create(:user) }
let(:seller_3) { create(:user) }
let(:seller_1_product_1) { create(:product, user: seller_1, name: "First product") }
let(:seller_1_pro... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/admin_nav_mobile_spec.rb | Ruby | mit | 8,966 | main | 570 | # frozen_string_literal: true
require "spec_helper"
describe("Admin - Nav - Mobile", :js, :mobile_view, type: :system) do
let(:admin) { create(:admin_user) }
before do
login_as admin
end
it "auto closes the menu when navigating to a different page" do
visit admin_suspend_users_path
click_on "To... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/user_custom_domain_spec.rb | Ruby | mit | 8,966 | main | 3,395 | # frozen_string_literal: true
require "spec_helper"
describe "UserCustomDomainScenario", type: :system, js: true do
include FillInUserProfileHelpers
before do
allow(Resolv::DNS).to receive_message_chain(:new, :getresources).and_return([double(name: "domains.gumroad.com")])
Link.__elasticsearch__.create_i... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/dashboard_mobile_table_spec.rb | Ruby | mit | 8,966 | main | 2,260 | # frozen_string_literal: true
require "spec_helper"
describe "Dashboard - Mobile Table Labels", type: :system, js: true, mobile_view: true do
let(:seller) { create(:named_seller) }
let(:product) { create(:product, user: seller, name: "Test eBook", price_cents: 1000) }
let!(:purchase_1) { create(:purchase_in_pr... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/balance_pages_spec.rb | Ruby | mit | 8,966 | main | 53,162 | # frozen_string_literal: true
require "spec_helper"
require "ostruct"
require "shared_examples/authorize_called"
describe "Balance Pages Scenario", js: true, type: :system do
include CollabProductHelper
include StripeMerchantAccountHelper
let(:seller) { create(:named_seller) }
let(:get_label_value) do
->... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/signup_spec.rb | Ruby | mit | 8,966 | main | 4,080 | # frozen_string_literal: true
require "spec_helper"
describe "Signup Feature Scenario", js: true, type: :system do
let(:user) { create(:user) }
it "supports signing up with password" do
visit signup_path
expect(page).to_not have_alert
expect(page).to have_link "Gumroad", href: UrlService.root_domain_... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/install_cli_spec.rb | Ruby | mit | 8,966 | main | 400 | # frozen_string_literal: true
require "spec_helper"
describe "GET /install-cli.sh" do
it "redirects to the Gumroad CLI install script on GitHub" do
get "/install-cli.sh", headers: { "HOST" => DOMAIN }
expect(response).to have_http_status(:redirect)
expect(response.location).to eq("https://raw.githubuse... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/login_spec.rb | Ruby | mit | 8,966 | main | 5,665 | # frozen_string_literal: true
require "spec_helper"
describe "Login Feature Scenario", js: true, type: :system do
let(:user) { create(:user) }
before do
ignore_js_error(/Error retrieving login status, fetch cancelled./)
end
describe "login", type: :system do
it "logs in a user" do
visit login_... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/two_factor_authentication_spec.rb | Ruby | mit | 8,966 | main | 9,140 | # frozen_string_literal: true
require "spec_helper"
describe "Two-Factor Authentication", js: true, type: :system do
include FillInUserProfileHelpers
let(:user) { create(:named_user, skip_enabling_two_factor_authentication: false) }
def login_to_app
visit login_path
submit_login_form
end
def sub... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/affiliates_signup_form_spec.rb | Ruby | mit | 8,966 | main | 7,991 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/authorize_called"
describe "Affiliate Signup Form", type: :system, js: true do
let(:seller) { create(:named_seller) }
include_context "with switching account to user as admin for seller"
context "when no published products are found"... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/team_memberships_spec.rb | Ruby | mit | 8,966 | main | 1,494 | # frozen_string_literal: true
require "spec_helper"
describe "Team Memberships", type: :system, js: true do
describe "Account switch" do
context "with logged in user" do
let(:user) { create(:user, name: "Gum") }
before do
create(:user_compliance_info, user:)
login_as user
end
... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/embed_spec.rb | Ruby | mit | 8,966 | main | 7,372 | # frozen_string_literal: true
require "spec_helper"
describe "Embed scenario", type: :system, js: true, mock_easypost: true, retry: 2 do
include EmbedHelpers
after(:all) { cleanup_embed_artifacts }
let(:product) { create(:physical_product) }
let!(:js_nonce) { SecureRandom.base64(32).chomp }
it "accepts p... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/password_reset_spec.rb | Ruby | mit | 8,966 | main | 3,215 | # frozen_string_literal: true
require("spec_helper")
describe("Password Reset", type: :system, js: true) do
include FillInUserProfileHelpers
before(:each) do
@user = create(:user)
@original_encrypted_password = @user.encrypted_password
@token = @user.send(:set_reset_password_token)
end
it "reset... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/customers/customers_spec.rb | Ruby | mit | 8,966 | main | 71,892 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/authorize_called"
describe "Sales page", type: :system, js: true do
let(:seller) { create(:named_seller, :eligible_for_service_products) }
let(:product1) { create(:product, user: seller, name: "Product 1", price_cents: 100) }
let(:memb... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/analytics/date_range_spec.rb | Ruby | mit | 8,966 | main | 1,187 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/authorize_called"
require "shared_examples/creator_dashboard_page"
describe "Analytics date range", :js, :sidekiq_inline, type: :system do
let(:seller) { create(:user, created_at: Date.new(2023, 1, 1)) }
let(:test_date) { Date.today }
... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/analytics/utm_links_spec.rb | Ruby | mit | 8,966 | main | 46,372 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/authorize_called"
require "shared_examples/creator_dashboard_page"
describe "UTM links", :js, type: :system do
let(:seller) { create(:user) }
before do
Feature.activate_user(:utm_links, seller)
end
describe "dashboard" do
i... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/analytics/audience_spec.rb | Ruby | mit | 8,966 | main | 2,988 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/authorize_called"
require "shared_examples/creator_dashboard_page"
describe "Audience analytics", :js, :sidekiq_inline, :elasticsearch_wait_for_refresh, type: :system do
let(:seller) { create(:user, created_at: 1.year.ago) }
include_con... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/analytics/sales_spec.rb | Ruby | mit | 8,966 | main | 12,611 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/authorize_called"
require "shared_examples/creator_dashboard_page"
describe "Sales analytics", :js, :sidekiq_inline, :elasticsearch_wait_for_refresh, type: :system do
let(:seller) { create(:user, created_at: Date.new(2023, 1, 1)) }
incl... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/analytics/churn_spec.rb | Ruby | mit | 8,966 | main | 7,902 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/authorize_called"
require "shared_examples/creator_dashboard_page"
describe "Churn analytics", :js, :sidekiq_inline, :elasticsearch_wait_for_refresh, type: :system do
let(:seller) { create(:user, timezone: "UTC", created_at: Date.new(2023,... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/user/disable_affiliate_requests_setting_spec.rb | Ruby | mit | 8,966 | main | 1,871 | # frozen_string_literal: true
require "spec_helper"
describe "Disable affiliate requests setting", type: :system, js: true do
let(:user) { create(:named_user) }
before do
login_as(user)
end
it "allows user to toggle the prevent being added as affiliate setting" do
visit settings_main_path
withi... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/user/gallery_spec.rb | Ruby | mit | 8,966 | main | 3,967 | # frozen_string_literal: true
require("spec_helper")
describe "User Gallery Page Scenario", :elasticsearch_wait_for_refresh, type: :system, js: true do
describe "Product thumbnails", :sidekiq_inline do
before do
@creator = create(:user, username: "creatorgal")
section = create(:seller_profile_produc... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/user/follow_page_spec.rb | Ruby | mit | 8,966 | main | 1,364 | # frozen_string_literal: true
require("spec_helper")
describe "/follow page", type: :system, js: true do
before do
@email = generate(:email)
@creator = create(:named_user)
@user = create(:user)
end
describe "following" do
it "allows user to subscribe when logged in" do
login_as(@user)
... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/user/profile_spec.rb | Ruby | mit | 8,966 | main | 27,007 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/authorize_called"
describe "User profile page", type: :system, js: true do
include FillInUserProfileHelpers
describe "viewing profile", :sidekiq_inline, :elasticsearch_wait_for_refresh do
let(:creator) { create(:named_user) }
i... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/user/affiliate_request_form_spec.rb | Ruby | mit | 8,966 | main | 5,750 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/authorize_called"
describe "Public affiliate request onboarding form", type: :system, js: true do
let(:creator) { create(:named_user) }
let!(:product) { create(:product, user: creator) }
let!(:enabled_self_service_affiliate_product) { ... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/user/follow_spec.rb | Ruby | mit | 8,966 | main | 1,987 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/authorize_called"
describe "User Follow Page Scenario", type: :system, js: true do
include FillInUserProfileHelpers
let(:seller) { create(:named_seller) }
let(:product) { create(:product, user: seller) }
let(:other_user) { create(:u... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/user/favicon_spec.rb | Ruby | mit | 8,966 | main | 1,724 | # frozen_string_literal: true
require "spec_helper"
describe "User favicons", type: :system, js: true do
before do
@product = create(:product, name: "product name", user: create(:named_user))
@purchase = create(:purchase, link: @product)
@post = create(:installment, seller: @product.user, link: @product... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/user/settings_spec.rb | Ruby | mit | 8,966 | main | 6,418 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/authorize_called"
describe "User profile settings page", type: :system, js: true do
before do
@user = create(:named_user, :with_bio)
time = Time.current
# So that the products get created in a consistent order
travel_to tim... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.