repo stringlengths 5 92 | file_url stringlengths 80 287 | file_path stringlengths 5 197 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:37:27 2026-01-04 17:58:21 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/policies/product_duplicates/link_policy_spec.rb | spec/policies/product_duplicates/link_policy_spec.rb | # frozen_string_literal: true
require "spec_helper"
describe ProductDuplicates::LinkPolicy do
subject { described_class }
let(:accountant_for_seller) { create(:user) }
let(:admin_for_seller) { create(:user) }
let(:marketing_for_seller) { create(:user) }
let(:support_for_seller) { create(:user) }
let(:sel... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/policies/products/collabs_policy_spec.rb | spec/policies/products/collabs_policy_spec.rb | # frozen_string_literal: true
require "spec_helper"
describe Products::CollabsPolicy do
subject { described_class }
let(:accountant_for_seller) { create(:user) }
let(:admin_for_seller) { create(:user) }
let(:marketing_for_seller) { create(:user) }
let(:support_for_seller) { create(:user) }
let(:seller) {... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/policies/products/affiliated_policy_spec.rb | spec/policies/products/affiliated_policy_spec.rb | # frozen_string_literal: true
require "spec_helper"
describe Products::AffiliatedPolicy do
subject { described_class }
let(:accountant_for_seller) { create(:user) }
let(:admin_for_seller) { create(:user) }
let(:marketing_for_seller) { create(:user) }
let(:support_for_seller) { create(:user) }
let(:seller... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/policies/products/variants/link_policy_spec.rb | spec/policies/products/variants/link_policy_spec.rb | # frozen_string_literal: true
require "spec_helper"
describe Products::Variants::LinkPolicy do
subject { described_class }
let(:accountant_for_seller) { create(:user) }
let(:admin_for_seller) { create(:user) }
let(:marketing_for_seller) { create(:user) }
let(:support_for_seller) { create(:user) }
let(:se... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/policies/products/archived/link_policy_spec.rb | spec/policies/products/archived/link_policy_spec.rb | # frozen_string_literal: true
require "spec_helper"
describe Products::Archived::LinkPolicy do
subject { described_class }
let(:accountant_for_seller) { create(:user) }
let(:admin_for_seller) { create(:user) }
let(:marketing_for_seller) { create(:user) }
let(:support_for_seller) { create(:user) }
let(:se... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/policies/gumroad_blog/posts_policy_spec.rb | spec/policies/gumroad_blog/posts_policy_spec.rb | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/policy_examples"
describe GumroadBlog::PostsPolicy do
subject { described_class }
let(:seller) { create(:user) }
let(:another_seller) { create(:user) }
let(:admin_for_seller) do
create(
:team_membership,
seller: sel... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/validators/email_format_validator_spec.rb | spec/validators/email_format_validator_spec.rb | # frozen_string_literal: true
require "spec_helper"
RSpec.describe EmailFormatValidator do
let(:model_class) do
Class.new do
include ActiveModel::Model
attr_accessor :email
end
end
let(:model) { model_class.new }
let(:valid_value) { "user@example.com" }
let(:invalid_value) { "invalid" ... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/validators/not_reserved_email_domain_validator_spec.rb | spec/validators/not_reserved_email_domain_validator_spec.rb | # frozen_string_literal: true
require "spec_helper"
RSpec.describe NotReservedEmailDomainValidator do
let(:model_class) do
Class.new do
include ActiveModel::Model
attr_accessor :email
end
end
let(:model) { model_class.new }
before { model_class.clear_validators! }
it "validates the em... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/validators/isbn_validator_spec.rb | spec/validators/isbn_validator_spec.rb | # frozen_string_literal: true
require "spec_helper"
RSpec.describe IsbnValidator do
let(:model_class) do
Class.new do
include ActiveModel::Model
attr_accessor :isbn
end
end
let(:model) { model_class.new }
before { model_class.clear_validators! }
context "when ISBN-13" do
let(:vali... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/factories/moldova_bank_accounts.rb | spec/factories/moldova_bank_accounts.rb | # frozen_string_literal: true
FactoryBot.define do
factory :moldova_bank_account do
association :user
bank_code { "AAAAMDMDXXX" }
account_number { "MD07AG123456789012345678" }
account_number_last_four { "5678" }
account_holder_full_name { "Chuck Bartowski" }
end
end
| ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/factories/user_tax_forms.rb | spec/factories/user_tax_forms.rb | # frozen_string_literal: true
FactoryBot.define do
factory :user_tax_form do
user
tax_year { 2024 }
tax_form_type { "us_1099_k" }
end
end
| ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/factories/cambodia_bank_accounts.rb | spec/factories/cambodia_bank_accounts.rb | # frozen_string_literal: true
FactoryBot.define do
factory :cambodia_bank_account do
user
bank_code { "AAAAKHKHXXX" }
account_number { "000123456789" }
account_number_last_four { "6789" }
account_holder_full_name { "Cambodian Creator" }
end
end
| ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/factories/product_installment_plans.rb | spec/factories/product_installment_plans.rb | # frozen_string_literal: true
FactoryBot.define do
factory :product_installment_plan do
link { create(:product, price_cents: 1000, native_type: Link::NATIVE_TYPE_DIGITAL) }
number_of_installments { 3 }
recurrence { "monthly" }
end
end
| ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/factories/sri_lanka_bank_accounts.rb | spec/factories/sri_lanka_bank_accounts.rb | # frozen_string_literal: true
FactoryBot.define do
factory :sri_lanka_bank_account do
user
bank_code { "AAAALKLXXXX" }
branch_code { "7010999" }
account_number { "0000012345" }
account_number_last_four { "2345" }
account_holder_full_name { "Sri Lankan Creator" }
end
end
| ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/factories/community_chat_messages.rb | spec/factories/community_chat_messages.rb | # frozen_string_literal: true
FactoryBot.define do
factory :community_chat_message do
association :community
association :user
content { "Hello, community!" }
end
end
| ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/factories/utm_link_visits.rb | spec/factories/utm_link_visits.rb | # frozen_string_literal: true
FactoryBot.define do
factory :utm_link_visit do
association :utm_link
user { nil }
ip_address { "127.0.0.1" }
browser_guid { SecureRandom.uuid }
country_code { "US" }
referrer { "https://twitter.com" }
user_agent { "Mozilla/5.0" }
end
end
| ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/factories/mauritius_bank_accounts.rb | spec/factories/mauritius_bank_accounts.rb | # frozen_string_literal: true
FactoryBot.define do
factory :mauritius_bank_account do
user
account_number { "MU17BOMM0101101030300200000MUR" }
account_number_last_four { "0MUR" }
bank_code { "AAAAMUMUXYZ" }
account_holder_full_name { "John Doe" }
end
end
| ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/factories/el_salvador_bank_accounts.rb | spec/factories/el_salvador_bank_accounts.rb | # frozen_string_literal: true
FactoryBot.define do
factory :el_salvador_bank_account do
association :user
bank_number { "AAAASVS1XXX" }
account_number { "SV44BCIE12345678901234567890" }
account_number_last_four { "7890" }
account_holder_full_name { "Chuck Bartowski" }
end
end
| ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/factories/bolivia_bank_accounts.rb | spec/factories/bolivia_bank_accounts.rb | # frozen_string_literal: true
FactoryBot.define do
factory :bolivia_bank_account do
user
account_number { "000123456789" }
bank_code { "040" }
account_number_last_four { "6789" }
account_holder_full_name { "Chuck Bartowski" }
state { "unverified" }
end
end
| ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/factories/uruguay_bank_accounts.rb | spec/factories/uruguay_bank_accounts.rb | # frozen_string_literal: true
FactoryBot.define do
factory :uruguay_bank_account do
user
account_number { "000123456789" }
account_number_last_four { "6789" }
bank_code { "999" }
account_holder_full_name { "John Doe" }
end
end
| ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/factories/jamaica_bank_accounts.rb | spec/factories/jamaica_bank_accounts.rb | # frozen_string_literal: true
FactoryBot.define do
factory :jamaica_bank_account do
user
bank_code { "111" } # 3-digit bank code
branch_code { "00000" } # 5-digit branch code
account_number { "000123456789" } # 1-18 digit account number
account_number_last_four { "6789" }
account_holder_fu... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/factories/dominican_republic_bank_accounts.rb | spec/factories/dominican_republic_bank_accounts.rb | # frozen_string_literal: true
FactoryBot.define do
factory :dominican_republic_bank_account do
user
account_number { "000123456789" }
bank_code { "999" }
account_number_last_four { "6789" }
account_holder_full_name { "Chuck Bartowski" }
end
end
| ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/factories/community_chat_recaps.rb | spec/factories/community_chat_recaps.rb | # frozen_string_literal: true
FactoryBot.define do
factory :community_chat_recap do
association :community_chat_recap_run
association :community
association :seller, factory: :user
summarized_message_count { 10 }
input_token_count { 1000 }
output_token_count { 200 }
status { "pending" }
... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/factories/communities.rb | spec/factories/communities.rb | # frozen_string_literal: true
FactoryBot.define do
factory :community do
association :seller, factory: :user
resource { association :product }
end
end
| ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/factories/utm_link_driven_sales.rb | spec/factories/utm_link_driven_sales.rb | # frozen_string_literal: true
FactoryBot.define do
factory :utm_link_driven_sale do
association :utm_link
association :utm_link_visit
association :purchase
end
end
| ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/factories/community_chat_recap_runs.rb | spec/factories/community_chat_recap_runs.rb | # frozen_string_literal: true
FactoryBot.define do
factory :community_chat_recap_run do
recap_frequency { "daily" }
from_date { (Time.current - rand(1..1000).days).beginning_of_day }
to_date { (Time.current - rand(1..1000).days).end_of_day }
recaps_count { 0 }
trait :weekly do
recap_freque... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/factories/armenia_bank_accounts.rb | spec/factories/armenia_bank_accounts.rb | # frozen_string_literal: true
FactoryBot.define do
factory :armenia_bank_account do
user
bank_code { "AAAAAMNNXXX" }
account_number { "00001234567" }
account_number_last_four { "4567" }
account_holder_full_name { "Armenia creator" }
end
end
| ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/factories/benin_bank_accounts.rb | spec/factories/benin_bank_accounts.rb | # frozen_string_literal: true
FactoryBot.define do
factory :benin_bank_account do
user
account_number { "BJ66BJ0610100100144390000769" }
account_number_last_four { "0769" }
account_holder_full_name { "Benin Creator" }
end
end
| ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/factories/macao_bank_accounts.rb | spec/factories/macao_bank_accounts.rb | # frozen_string_literal: true
FactoryBot.define do
factory :macao_bank_account do
user
account_number { "0000000001234567897" }
account_number_last_four { "7897" }
bank_code { "AAAAMOMXXXX" }
account_holder_full_name { "Macao Creator" }
end
end
| ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/factories/public_files.rb | spec/factories/public_files.rb | # frozen_string_literal: true
FactoryBot.define do
factory :public_file do
sequence(:original_file_name) { |n| "test-#{n}.mp3" }
sequence(:display_name) { |n| "Test audio #{n}" }
public_id { PublicFile.generate_public_id }
resource { association :product }
trait :with_audio do
after(:build... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/factories/kuwait_bank_accounts.rb | spec/factories/kuwait_bank_accounts.rb | # frozen_string_literal: true
FactoryBot.define do
factory :kuwait_bank_account do
user
bank_code { "AAAAKWKWXYZ" }
account_number { "KW81CBKU0000000000001234560101" }
account_number_last_four { "0101" }
account_holder_full_name { "Kuwaiti Creator" }
end
end
| ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/factories/last_read_community_chat_messages.rb | spec/factories/last_read_community_chat_messages.rb | # frozen_string_literal: true
FactoryBot.define do
factory :last_read_community_chat_message do
association :user
association :community
association :community_chat_message
end
end
| ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/factories/utm_links.rb | spec/factories/utm_links.rb | # frozen_string_literal: true
FactoryBot.define do
factory :utm_link do
association :seller, factory: :user
sequence(:title) { |n| "UTM Link #{n}" }
target_resource_type { :profile_page }
sequence(:utm_campaign) { |n| "summer-sale-#{n}" }
utm_medium { "social" }
utm_source { "twitter" }
end... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/factories/cote_d_ivoire_bank_accounts.rb | spec/factories/cote_d_ivoire_bank_accounts.rb | # frozen_string_literal: true
FactoryBot.define do
factory :cote_d_ivoire_bank_account do
user
account_number { "CI93CI0080111301134291200589" }
account_number_last_four { "0589" }
account_holder_full_name { "Cote d'Ivoire Creator" }
end
end
| ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/factories/panama_bank_accounts.rb | spec/factories/panama_bank_accounts.rb | # frozen_string_literal: true
FactoryBot.define do
factory :panama_bank_account do
association :user
bank_number { "AAAAPAPAXXX" }
account_number { "000123456789" }
account_number_last_four { "6789" }
account_holder_full_name { "Chuck Bartowski" }
end
end
| ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/factories/uzbekistan_bank_accounts.rb | spec/factories/uzbekistan_bank_accounts.rb | # frozen_string_literal: true
FactoryBot.define do
factory :uzbekistan_bank_account do
user
account_number { "99934500012345670024" }
bank_code { "AAAAUZUZXXX" }
branch_code { "00000" }
account_number_last_four { "0024" }
account_holder_full_name { "Chuck Bartowski" }
end
end
| ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/factories/mongolia_bank_accounts.rb | spec/factories/mongolia_bank_accounts.rb | # frozen_string_literal: true
FactoryBot.define do
factory :mongolia_bank_account do
user
bank_code { "AAAAMNUBXXX" }
account_number { "0002222001" }
account_number_last_four { "2001" }
account_holder_full_name { "Mongolian Creator" }
end
end
| ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/factories/community_notification_settings.rb | spec/factories/community_notification_settings.rb | # frozen_string_literal: true
FactoryBot.define do
factory :community_notification_setting do
association :user
association :seller, factory: :user
recap_frequency { "daily" }
trait :weekly_recap do
recap_frequency { "weekly" }
end
trait :no_recap do
recap_frequency { nil }
... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/third_party_analytics_controller_spec.rb | spec/controllers/third_party_analytics_controller_spec.rb | # frozen_string_literal: true
require "spec_helper"
describe ThirdPartyAnalyticsController do
render_views
before do
@seller = create(:user)
@product = create(:product, user: @seller)
@purchase = create(:purchase, link: @product)
@product_product_snippet = create(:third_party_analytic, user: @sel... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/checkout_controller_spec.rb | spec/controllers/checkout_controller_spec.rb | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/sellers_base_controller_concern"
require "shared_examples/authorize_called"
describe CheckoutController do
describe "GET index" do
it "returns HTTP success and assigns correct instance variables" do
get :index
expect(assig... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/profile_sections_controller_spec.rb | spec/controllers/profile_sections_controller_spec.rb | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/sellers_base_controller_concern"
require "shared_examples/authorize_called"
describe ProfileSectionsController do
let(:seller) { create(:named_seller) }
let(:pundit_user) { SellerContext.new(user: seller, seller:) }
it_behaves_like "a... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/public_controller_spec.rb | spec/controllers/public_controller_spec.rb | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/authorize_called"
require "inertia_rails/rspec"
describe PublicController, type: :controller, inertia: true do
render_views
let!(:demo_product) { create(:product, unique_permalink: "demo") }
{ api: "API" }.each do |url, title|
de... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/affiliate_requests_controller_spec.rb | spec/controllers/affiliate_requests_controller_spec.rb | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/authorize_called"
describe AffiliateRequestsController do
describe "GET new" do
context "when the creator doesn't exist" do
it "renders 404 page" do
expect do
get :new, params: { username: "someone" }
en... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/stripe_account_sessions_controller_spec.rb | spec/controllers/stripe_account_sessions_controller_spec.rb | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/authorize_called"
RSpec.describe StripeAccountSessionsController do
let(:seller) { create(:named_seller) }
let(:connected_account_id) { "acct_123" }
before do
sign_in(seller)
end
describe "#create" do
it_behaves_like "aut... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/media_locations_controller_spec.rb | spec/controllers/media_locations_controller_spec.rb | # frozen_string_literal: true
require "spec_helper"
describe MediaLocationsController do
describe "POST create" do
before do
@product = create(:product)
@product_file = create(:product_file, link: @product)
@purchase = create(:purchase, link: @product, purchase_state: :successful)
@url_r... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/customers_controller_spec.rb | spec/controllers/customers_controller_spec.rb | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/authorize_called"
require "inertia_rails/rspec"
describe CustomersController, :vcr, type: :controller, inertia: true do
render_views
let(:seller) { create(:named_user) }
include_context "with user signed in as admin for seller"
de... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/purchase_custom_fields_controller_spec.rb | spec/controllers/purchase_custom_fields_controller_spec.rb | # frozen_string_literal: true
require "spec_helper"
describe PurchaseCustomFieldsController do
describe "POST create" do
let(:user) { create(:user) }
let(:product) { create(:product, user: user) }
let(:purchase) { create(:purchase, link: product) }
let(:custom_field) { create(:custom_field, products... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/affiliate_redirect_controller_spec.rb | spec/controllers/affiliate_redirect_controller_spec.rb | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/affiliate_cookie_concern"
describe AffiliateRedirectController do
let(:creator) { create(:user) }
let(:product) { create(:product, user: creator) }
let(:product_2) { create(:product, user: creator) }
let(:affiliate_user) { create(:af... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/calls_controller_spec.rb | spec/controllers/calls_controller_spec.rb | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/sellers_base_controller_concern"
require "shared_examples/authorize_called"
describe CallsController do
let(:seller) { create(:named_seller, :eligible_for_service_products) }
let(:pundit_user) { SellerContext.new(user: seller, seller:) }... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/orders_controller_spec.rb | spec/controllers/orders_controller_spec.rb | # frozen_string_literal: false
require "spec_helper"
require "shared_examples/authorize_called"
include CurrencyHelper
describe OrdersController, :vcr do
before do
cookies[:_gumroad_guid] = SecureRandom.uuid
end
describe "POST create" do
let(:seller_1) { create(:user) }
let(:seller_2) { create(:us... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | true |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/recommended_products_controller_spec.rb | spec/controllers/recommended_products_controller_spec.rb | # frozen_string_literal: true
require "spec_helper"
describe RecommendedProductsController do
describe "GET index" do
let(:recommender_model_name) { RecommendedProductsService::MODEL_SALES }
let(:cart_product) { create(:product) }
let(:products) { create_list(:product, 5) }
let(:products_relation) {... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/customer_surcharge_controller_spec.rb | spec/controllers/customer_surcharge_controller_spec.rb | # frozen_string_literal: true
require "spec_helper"
describe CustomerSurchargeController, :vcr do
include ManageSubscriptionHelpers
before do
@user = create(:user)
@product = create(:product, user: @user)
@physical_product = create(:physical_product, user: @user)
country_code = Compliance::Countr... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/tags_controller_spec.rb | spec/controllers/tags_controller_spec.rb | # frozen_string_literal: true
require "spec_helper"
describe TagsController do
describe "List tags" do
it "Shows matching tags alphabetically" do
%w[Armadillo Antelope Marmoset Aardvark].each { |animal| create(:tag, name: animal) }
get(:index, params: { text: "a" })
expect(response.parsed_body... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/collaborators_controller_spec.rb | spec/controllers/collaborators_controller_spec.rb | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/sellers_base_controller_concern"
require "shared_examples/authorize_called"
require "inertia_rails/rspec"
describe CollaboratorsController, inertia: true do
render_views
it_behaves_like "inherits from Sellers::BaseController"
let(:se... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/subscriptions_controller_spec.rb | spec/controllers/subscriptions_controller_spec.rb | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/authorize_called"
describe SubscriptionsController do
let(:seller) { create(:named_seller) }
let(:subscriber) { create(:user) }
before do
@product = create(:membership_product, subscription_duration: "monthly", user: seller)
@... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/followers_controller_spec.rb | spec/controllers/followers_controller_spec.rb | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/authorize_called"
require "inertia_rails/rspec"
describe FollowersController, inertia: true do
render_views
let(:seller) { create(:named_seller) }
let(:pundit_user) { SellerContext.new(user: seller, seller:) }
context "within selle... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/oauth_completions_controller_spec.rb | spec/controllers/oauth_completions_controller_spec.rb | # frozen_string_literal: true
require "spec_helper"
describe OauthCompletionsController, :vcr do
describe "#stripe" do
let(:auth_uid) { "acct_1SOb0DEwFhlcVS6d" }
let(:referer) { settings_payments_path }
let(:user) { create(:user) }
def set_session_data
session[:stripe_connect_data] = {
... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/product_reviews_controller_spec.rb | spec/controllers/product_reviews_controller_spec.rb | # frozen_string_literal: true
require "spec_helper"
describe ProductReviewsController do
let(:product) { create(:product) }
let(:purchaser) { create(:user) }
let(:purchase) { create(:purchase, link: product, purchaser: purchaser, created_at: 2.years.ago) }
let(:valid_params) do
{
link_id: product.un... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/consumption_analytics_controller_spec.rb | spec/controllers/consumption_analytics_controller_spec.rb | # frozen_string_literal: true
require "spec_helper"
describe ConsumptionAnalyticsController do
describe "POST create" do
before do
@purchased_link = create(:product)
@product_file = create(:product_file, link: @purchased_link)
@purchase = create(:purchase, link: @purchased_link, purchase_state... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/tax_center_controller_spec.rb | spec/controllers/tax_center_controller_spec.rb | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/sellers_base_controller_concern"
require "shared_examples/authorize_called"
require "inertia_rails/rspec"
describe TaxCenterController, type: :controller, inertia: true do
let(:seller) { create(:user, created_at: 2.years.ago) }
before d... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/two_factor_authentication_controller_spec.rb | spec/controllers/two_factor_authentication_controller_spec.rb | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/merge_guest_cart_with_user_cart"
describe TwoFactorAuthenticationController do
render_views
include UsersHelper
before do
@user = create(:user, two_factor_authentication_enabled: true)
end
shared_examples_for "redirect to sig... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/users_controller_spec.rb | spec/controllers/users_controller_spec.rb | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/authorize_called"
describe UsersController do
render_views
let(:creator) { create(:user, username: "creator") }
let(:seller) { create(:named_seller) }
describe "GET current_user_data" do
context "when user is signed in" do
... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/confirmations_controller_spec.rb | spec/controllers/confirmations_controller_spec.rb | # frozen_string_literal: true
require "spec_helper"
describe ConfirmationsController do
before do
request.env["devise.mapping"] = Devise.mappings[:user]
@user = create(:user, confirmed_at: nil)
end
describe "#show" do
describe "already confirmed" do
before do
@confirmation_token = @us... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/commissions_controller_spec.rb | spec/controllers/commissions_controller_spec.rb | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/sellers_base_controller_concern"
require "shared_examples/authorize_called"
describe CommissionsController, :vcr do
let(:seller) { create(:named_seller, :eligible_for_service_products) }
let(:pundit_user) { SellerContext.new(user: seller... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/braintree_controller_spec.rb | spec/controllers/braintree_controller_spec.rb | # frozen_string_literal: true
require "spec_helper"
describe BraintreeController, :vcr do
describe "#client_token" do
it "returns client token in json on success" do
get :client_token
response_hash = response.parsed_body
expect(response_hash["clientToken"].present?).to be true
end
it ... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/imported_customers_controller_spec.rb | spec/controllers/imported_customers_controller_spec.rb | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/authorize_called"
describe ImportedCustomersController do
let(:seller) { create(:named_user) }
describe "GET index" do
include_context "with user signed in as admin for seller"
before do
@product = create(:product, user: ... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/secure_redirect_controller_spec.rb | spec/controllers/secure_redirect_controller_spec.rb | # frozen_string_literal: true
require "spec_helper"
describe SecureRedirectController, type: :controller do
let(:destination_url) { user_unsubscribe_url(id: "sample-id", email_type: "notify") }
let(:confirmation_text) { "user@example.com" }
let(:secure_payload) do
{
destination: destination_url,
... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/embedded_javascripts_controller_spec.rb | spec/controllers/embedded_javascripts_controller_spec.rb | # frozen_string_literal: true
require "spec_helper"
describe EmbeddedJavascriptsController do
render_views
describe "overlay" do
it "returns the correct js" do
get :overlay, format: :js
expect(response.body).to match(ActionController::Base.helpers.asset_url(Shakapacker.manifest.lookup!("overlay.j... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/offer_codes_controller_spec.rb | spec/controllers/offer_codes_controller_spec.rb | # frozen_string_literal: true
require "spec_helper"
describe OfferCodesController do
describe "#compute_discount" do
let(:product) { create(:product, price_cents: 500) }
let(:offer_code) { create(:offer_code, products: [product], max_purchase_count: 2) }
let(:offer_code_params) do
{
code: ... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/licenses_controller_spec.rb | spec/controllers/licenses_controller_spec.rb | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/sellers_base_controller_concern"
require "shared_examples/authorize_called"
describe LicensesController do
it_behaves_like "inherits from Sellers::BaseController"
render_views
let(:seller) { create(:named_seller) }
let(:license) { ... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/healthcheck_controller_spec.rb | spec/controllers/healthcheck_controller_spec.rb | # frozen_string_literal: true
require "spec_helper"
describe HealthcheckController do
describe "GET 'index'" do
it "returns 'healthcheck' as text" do
get :index
expect(response.status).to eq(200)
expect(response.body).to eq("healthcheck")
end
end
shared_examples "sidekiq healthcheck"... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/signup_controller_spec.rb | spec/controllers/signup_controller_spec.rb | # frozen_string_literal: true
require "spec_helper"
require "inertia_rails/rspec"
describe SignupController, type: :controller, inertia: true do
render_views
before :each do
request.env["devise.mapping"] = Devise.mappings[:user]
end
describe "GET new" do
describe "Sign up and connect to OAuth app" d... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/test_pings_controller_spec.rb | spec/controllers/test_pings_controller_spec.rb | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/sellers_base_controller_concern"
require "shared_examples/authorize_called"
describe TestPingsController do
it_behaves_like "inherits from Sellers::BaseController"
let(:seller) { create(:user, notification_endpoint: "http://notification... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/posts_controller_spec.rb | spec/controllers/posts_controller_spec.rb | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/authorize_called"
describe PostsController do
let(:seller) { create(:named_seller) }
context "within seller area" do
include_context "with user signed in as admin for seller"
describe "GET redirect_from_purchase_id" do
be... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/workflows_controller_spec.rb | spec/controllers/workflows_controller_spec.rb | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/authorize_called"
require "shared_examples/sellers_base_controller_concern"
require "inertia_rails/rspec"
describe WorkflowsController, type: :controller, inertia: true do
it_behaves_like "inherits from Sellers::BaseController"
let(:sel... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/shipments_controller_spec.rb | spec/controllers/shipments_controller_spec.rb | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/authorize_called"
describe ShipmentsController, :vcr do
describe "POST verify_shipping_address" do
describe "US address" do
before do
@params = {
street_address: "1640 17th St",
city: "San Francisco",... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/application_controller_spec.rb | spec/controllers/application_controller_spec.rb | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/authorize_called"
describe ApplicationController do
controller do
def index
render plain: "spec"
end
end
def index(p = {})
get :index, params: p
end
def stubbed_cookie
calculated_fingerprint = "3dfakl93klfdj... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/robots_controller_spec.rb | spec/controllers/robots_controller_spec.rb | # frozen_string_literal: true
require "spec_helper"
describe RobotsController do
render_views
describe "GET index" do
before do
@sitemap_config = "Sitemap: https://example.com/sitemap.xml"
@user_agent_rules = ["User-agent: *", "Disallow: /purchases/"]
robots_service = instance_double(Robot... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/audience_controller_spec.rb | spec/controllers/audience_controller_spec.rb | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/authorize_called"
require "inertia_rails/rspec"
describe AudienceController, inertia: true do
let(:seller) { create(:named_seller) }
include_context "with user signed in as admin for seller"
describe "GET index" do
it_behaves_lik... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/comments_controller_spec.rb | spec/controllers/comments_controller_spec.rb | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/authorize_called"
describe CommentsController do
include ManageSubscriptionHelpers
let(:seller) { create(:named_seller) }
let(:product) { create(:product, user: seller) }
let(:user) { create(:user) }
shared_examples_for "erroneou... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/home_controller_spec.rb | spec/controllers/home_controller_spec.rb | # frozen_string_literal: true
require "spec_helper"
describe HomeController do
render_views
describe "GET small_bets" do
it "renders successfully" do
get :small_bets
expect(response).to be_successful
expect(assigns(:title)).to eq("Small Bets by Gumroad")
expect(assigns(:hide_layouts)... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/purchases_controller_spec.rb | spec/controllers/purchases_controller_spec.rb | # frozen_string_literal: false
require "spec_helper"
require "shared_examples/authorize_called"
require "shared_examples/order_association_with_cart_post_checkout"
include CurrencyHelper
describe PurchasesController, :vcr do
include ManageSubscriptionHelpers
render_views
let(:price) { 600 }
let(:product) {... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | true |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/links_controller_spec.rb | spec/controllers/links_controller_spec.rb | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/affiliate_cookie_concern"
require "shared_examples/authorize_called"
require "shared_examples/collaborator_access"
require "shared_examples/with_sorting_and_pagination"
require "inertia_rails/rspec"
def e404_test(action)
it "404s when link... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | true |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/product_review_responses_controller_spec.rb | spec/controllers/product_review_responses_controller_spec.rb | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/authorize_called"
describe ProductReviewResponsesController do
describe "PUT update" do
let!(:seller) { create(:named_seller) }
let!(:product) { create(:product, user: seller) }
let!(:purchaser) { create(:user) }
let!(:purc... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/reviews_controller_spec.rb | spec/controllers/reviews_controller_spec.rb | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/authorize_called"
require "inertia_rails/rspec"
describe ReviewsController, type: :controller, inertia: true do
let(:user) { create(:user) }
describe "GET index" do
before do
Feature.activate(:reviews_page)
sign_in(user)... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/emails_controller_spec.rb | spec/controllers/emails_controller_spec.rb | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/authorize_called"
require "shared_examples/sellers_base_controller_concern"
require "inertia_rails/rspec"
describe EmailsController, type: :controller, inertia: true do
it_behaves_like "inherits from Sellers::BaseController"
render_view... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/instant_payouts_controller_spec.rb | spec/controllers/instant_payouts_controller_spec.rb | # frozen_string_literal: true
require "spec_helper"
describe InstantPayoutsController do
let(:seller) { create(:user) }
let(:instant_payouts_service) { instance_double(InstantPayoutsService) }
let(:date) { 1.day.ago.to_date }
before do
sign_in seller
allow(InstantPayoutsService).to receive(:new).with... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/thumbnails_controller_spec.rb | spec/controllers/thumbnails_controller_spec.rb | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/sellers_base_controller_concern"
require "shared_examples/authorize_called"
describe ThumbnailsController, :vcr do
it_behaves_like "inherits from Sellers::BaseController"
let(:seller) { create(:named_seller) }
let(:product) { create(:... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/dropbox_files_controller_spec.rb | spec/controllers/dropbox_files_controller_spec.rb | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/sellers_base_controller_concern"
require "shared_examples/authorize_called"
describe DropboxFilesController do
it_behaves_like "inherits from Sellers::BaseController"
let(:seller) { create(:named_seller) }
include_context "with user ... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/wishlists_controller_spec.rb | spec/controllers/wishlists_controller_spec.rb | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/authorize_called"
require "inertia_rails/rspec"
describe WishlistsController, type: :controller, inertia: true do
let(:user) { create(:user) }
let(:wishlist) { create(:wishlist, user:) }
describe "GET index" do
before do
sig... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/url_redirects_controller_spec.rb | spec/controllers/url_redirects_controller_spec.rb | # frozen_string_literal: true
require "spec_helper"
describe UrlRedirectsController do
render_views
before do
@product = create(:product_with_pdf_file)
@url_redirect = create(:url_redirect, purchase: create(:purchase, email: "abCabC@abc.com", link: @product))
@token = @url_redirect.token
@url = @... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | true |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/product_duplicates_controller_spec.rb | spec/controllers/product_duplicates_controller_spec.rb | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/sellers_base_controller_concern"
require "shared_examples/authorize_called"
describe ProductDuplicatesController do
it_behaves_like "inherits from Sellers::BaseController"
let(:seller) { create(:named_seller) }
let(:product) { create(... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/library_controller_spec.rb | spec/controllers/library_controller_spec.rb | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/sellers_base_controller_concern"
require "shared_examples/authorize_called"
require "inertia_rails/rspec"
describe LibraryController, :vcr, type: :controller, inertia: true do
it_behaves_like "inherits from Sellers::BaseController"
let(... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/dashboard_controller_spec.rb | spec/controllers/dashboard_controller_spec.rb | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/sellers_base_controller_concern"
require "shared_examples/authorize_called"
require "inertia_rails/rspec"
describe DashboardController, type: :controller, inertia: true do
render_views
it_behaves_like "inherits from Sellers::BaseControl... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/affiliates_controller_spec.rb | spec/controllers/affiliates_controller_spec.rb | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/authorize_called"
require "shared_examples/authentication_required"
require "inertia_rails/rspec"
describe AffiliatesController, type: :controller, inertia: true do
let(:seller) { create(:named_seller) }
let!(:product) { create(:product,... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/utm_links_controller_spec.rb | spec/controllers/utm_links_controller_spec.rb | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/sellers_base_controller_concern"
require "shared_examples/authorize_called"
describe UtmLinksController do
let(:seller) { create(:user) }
let(:pundit_user) { SellerContext.new(user: seller, seller:) }
include_context "with user signed... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/analytics_controller_spec.rb | spec/controllers/analytics_controller_spec.rb | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/authorize_called"
describe AnalyticsController do
render_views
let(:seller) { create(:named_seller) }
include_context "with user signed in as admin for seller"
describe "GET index" do
it_behaves_like "authorize called for acti... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/acme_challenges_controller_spec.rb | spec/controllers/acme_challenges_controller_spec.rb | # frozen_string_literal: true
require "spec_helper"
describe AcmeChallengesController do
describe "GET 'show'" do
let(:token) { "a" * 43 }
let(:challenge_content) { "challenge-response-content" }
context "when challenge exists in Redis" do
before do
$redis.set(RedisKey.acme_challenge(toke... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/asset_previews_controller_spec.rb | spec/controllers/asset_previews_controller_spec.rb | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/authorize_called"
describe AssetPreviewsController do
let(:seller) { create(:named_seller) }
let(:product) { create(:product, user: seller) }
let(:s3_url) { "#{AWS_S3_ENDPOINT}/#{S3_BUCKET}/specs/test.png" }
include_context "with us... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/paypal_controller_spec.rb | spec/controllers/paypal_controller_spec.rb | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/authorize_called"
describe PaypalController, :vcr do
include AffiliateCookie
let(:window_location) { "https://127.0.0.1:3000/l/test?wanted=true" }
let(:paypal_auth_token) { "Bearer A21AAF5T7EesDXLWLuLRvWyMYLvqXkVxpL_exqSEColXRRl47Bxzj... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.