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/controllers/api/mobile/purchases_controller_spec.rb
spec/controllers/api/mobile/purchases_controller_spec.rb
# frozen_string_literal: true require "spec_helper" require "shared_examples/paginated_api" describe Api::Mobile::PurchasesController do before do @user = create(:user) @purchaser = create(:user) @app = create(:oauth_application, owner: @user) @params = { mobile_token: Api::Mobile::BaseControl...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
true
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/api/mobile/url_redirects_controller_spec.rb
spec/controllers/api/mobile/url_redirects_controller_spec.rb
# frozen_string_literal: true require "spec_helper" describe Api::Mobile::UrlRedirectsController do before do @product = create(:product, name: "The Works of Edgar Gumstein", description: "A collection of works spanning 1984 — 1994") @product_file1 = create(:product_file, position: 0, link: @product, descri...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/api/mobile/sales_controller_spec.rb
spec/controllers/api/mobile/sales_controller_spec.rb
# frozen_string_literal: true require "spec_helper" describe Api::Mobile::SalesController, :vcr do before do @seller = create(:user) @product = create(:product, user: @seller) @purchaser = create(:user) @app = create(:oauth_application, owner: @seller) @params = { mobile_token: Api::Mobile...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/api/mobile/devices_controller_spec.rb
spec/controllers/api/mobile/devices_controller_spec.rb
# frozen_string_literal: true require "spec_helper" describe Api::Mobile::DevicesController do before do @user = create(:user) @app = create(:oauth_application, owner: @user) end describe "POST create" do context "when making a request while unauthenticated" do it "fails" do post :cre...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/api/mobile/analytics_controller_spec.rb
spec/controllers/api/mobile/analytics_controller_spec.rb
# frozen_string_literal: true require "spec_helper" require "shared_examples/paginated_api" describe Api::Mobile::AnalyticsController do before do @app = create(:oauth_application, owner: create(:user)) @user = create(:user, timezone: "UTC", created_at: Time.utc(2019)) @params = { mobile_token: Ap...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/api/mobile/feature_flags_controller_spec.rb
spec/controllers/api/mobile/feature_flags_controller_spec.rb
# frozen_string_literal: true require "spec_helper" describe Api::Mobile::FeatureFlagsController do let(:user) { create(:user) } let(:app) { create(:oauth_application, owner: user) } let(:params) do { mobile_token: Api::Mobile::BaseController::MOBILE_TOKEN, access_token: create("doorkeeper/acces...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/api/internal/ai_product_details_generations_controller_spec.rb
spec/controllers/api/internal/ai_product_details_generations_controller_spec.rb
# frozen_string_literal: true require "spec_helper" require "shared_examples/authentication_required" require "shared_examples/authorize_called" describe Api::Internal::AiProductDetailsGenerationsController do let(:seller) { create(:named_seller) } include_context "with user signed in as admin for seller" des...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/api/internal/collaborators_controller_spec.rb
spec/controllers/api/internal/collaborators_controller_spec.rb
# frozen_string_literal: true require "spec_helper" require "shared_examples/authorize_called" require "shared_examples/authentication_required" describe Api::Internal::CollaboratorsController do let(:seller) { create(:user) } let!(:product) { create(:product, user: 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/api/internal/home_page_numbers_controller_spec.rb
spec/controllers/api/internal/home_page_numbers_controller_spec.rb
# frozen_string_literal: true require "spec_helper" describe Api::Internal::HomePageNumbersController do context "when the return value is cached" do let(:cached_value) do { prev_week_payout_usd: "$37,537" } end before do Rails.cache.write("homepage_numbers", cached_value) ...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/api/internal/product_posts_controller_spec.rb
spec/controllers/api/internal/product_posts_controller_spec.rb
# frozen_string_literal: true require "spec_helper" require "shared_examples/authorize_called" require "shared_examples/authentication_required" require "shared_examples/with_workflow_form_context" describe Api::Internal::ProductPostsController do let(:seller) { create(:user) } 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/api/internal/carts_controller_spec.rb
spec/controllers/api/internal/carts_controller_spec.rb
# frozen_string_literal: true require "spec_helper" describe Api::Internal::CartsController do let!(:seller) { create(:named_seller) } describe "PUT update" do context "when user is signed in" do before do sign_in(seller) end it "creates an empty cart" do expect do ...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/api/internal/utm_links_controller_spec.rb
spec/controllers/api/internal/utm_links_controller_spec.rb
# frozen_string_literal: true require "spec_helper" require "shared_examples/authorize_called" require "shared_examples/authentication_required" describe Api::Internal::UtmLinksController do let(:seller) { create(:user) } before do Feature.activate_user(:utm_links, seller) end 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/api/internal/product_public_files_controller_spec.rb
spec/controllers/api/internal/product_public_files_controller_spec.rb
# frozen_string_literal: true require "spec_helper" require "shared_examples/authorize_called" require "shared_examples/authentication_required" describe Api::Internal::ProductPublicFilesController do let(:seller) { create(:user) } let(:product) { create(:product, user: seller) } include_context "with user sig...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/api/internal/existing_product_files_controller_spec.rb
spec/controllers/api/internal/existing_product_files_controller_spec.rb
# frozen_string_literal: true require "spec_helper" require "shared_examples/authorize_called" require "shared_examples/authentication_required" require "shared_examples/with_workflow_form_context" describe Api::Internal::ExistingProductFilesController do let(:seller) { create(:user) } 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/api/internal/communities_controller_spec.rb
spec/controllers/api/internal/communities_controller_spec.rb
# frozen_string_literal: true require "spec_helper" require "shared_examples/sellers_base_controller_concern" require "shared_examples/authorize_called" describe Api::Internal::CommunitiesController do let(:seller) { create(:user) } let(:pundit_user) { SellerContext.new(user: seller, seller:) } let(:product) { ...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/api/internal/communities/last_read_chat_messages_controller_spec.rb
spec/controllers/api/internal/communities/last_read_chat_messages_controller_spec.rb
# frozen_string_literal: true require "spec_helper" require "shared_examples/sellers_base_controller_concern" require "shared_examples/authorize_called" describe Api::Internal::Communities::LastReadChatMessagesController do let(:seller) { create(:user) } let(:product) { create(:product, user: seller, community_ch...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/api/internal/communities/notification_settings_controller_spec.rb
spec/controllers/api/internal/communities/notification_settings_controller_spec.rb
# frozen_string_literal: true require "spec_helper" require "shared_examples/sellers_base_controller_concern" require "shared_examples/authorize_called" describe Api::Internal::Communities::NotificationSettingsController do let(:seller) { create(:user) } let(:product) { create(:product, user: seller, community_ch...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/api/internal/communities/chat_messages_controller_spec.rb
spec/controllers/api/internal/communities/chat_messages_controller_spec.rb
# frozen_string_literal: true require "spec_helper" require "shared_examples/sellers_base_controller_concern" require "shared_examples/authorize_called" describe Api::Internal::Communities::ChatMessagesController do let(:seller) { create(:user) } let(:product) { create(:product, user: seller, community_chat_enabl...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/api/internal/installments/recipient_counts_controller_spec.rb
spec/controllers/api/internal/installments/recipient_counts_controller_spec.rb
# frozen_string_literal: true require "spec_helper" require "shared_examples/authorize_called" require "shared_examples/authentication_required" describe Api::Internal::Installments::RecipientCountsController do let(:seller) { create(:user) } include_context "with user signed in as admin for seller" describe ...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/api/internal/installments/preview_emails_controller_spec.rb
spec/controllers/api/internal/installments/preview_emails_controller_spec.rb
# frozen_string_literal: true require "spec_helper" require "shared_examples/authorize_called" require "shared_examples/authentication_required" describe Api::Internal::Installments::PreviewEmailsController do let(:seller) { create(:user) } let(:installment) { create(:installment, seller:) } include_context "w...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/api/internal/installments/audience_counts_controller_spec.rb
spec/controllers/api/internal/installments/audience_counts_controller_spec.rb
# frozen_string_literal: true require "spec_helper" require "shared_examples/authorize_called" require "shared_examples/authentication_required" describe Api::Internal::Installments::AudienceCountsController do let(:seller) { create(:user) } include_context "with user signed in as admin for seller" describe "...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/api/internal/collaborators/incomings_controller_spec.rb
spec/controllers/api/internal/collaborators/incomings_controller_spec.rb
# frozen_string_literal: true require "spec_helper" require "shared_examples/authentication_required" describe Api::Internal::Collaborators::IncomingsController do let!(:seller1) { create(:user) } let!(:seller2) { create(:user) } let!(:invited_user) { create(:user) } let!(:seller1_product) { create(:product,...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/api/internal/collaborators/invitation_declines_controller_spec.rb
spec/controllers/api/internal/collaborators/invitation_declines_controller_spec.rb
# frozen_string_literal: true require "spec_helper" require "shared_examples/authentication_required" describe Api::Internal::Collaborators::InvitationDeclinesController do let!(:seller) { create(:user) } let!(:invited_user) { create(:user) } let!(:collaborator) { create(:collaborator, seller: seller, affiliate...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/api/internal/collaborators/invitation_acceptances_controller_spec.rb
spec/controllers/api/internal/collaborators/invitation_acceptances_controller_spec.rb
# frozen_string_literal: true require "spec_helper" require "shared_examples/authentication_required" describe Api::Internal::Collaborators::InvitationAcceptancesController do let!(:seller) { create(:user) } let!(:invited_user) { create(:user) } let!(:collaborator) { create(:collaborator, seller: seller, affili...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/api/internal/utm_links/unique_permalinks_controller_spec.rb
spec/controllers/api/internal/utm_links/unique_permalinks_controller_spec.rb
# frozen_string_literal: true require "spec_helper" require "shared_examples/authorize_called" require "shared_examples/authentication_required" describe Api::Internal::UtmLinks::UniquePermalinksController do let(:seller) { create(:user) } before do Feature.activate_user(:utm_links, seller) end include_...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/api/internal/utm_links/stats_controller_spec.rb
spec/controllers/api/internal/utm_links/stats_controller_spec.rb
# frozen_string_literal: true require "spec_helper" require "shared_examples/authorize_called" require "shared_examples/authentication_required" describe Api::Internal::UtmLinks::StatsController do let(:seller) { create(:user) } let!(:utm_link1) { create(:utm_link, seller:, unique_clicks: 3) } let!(:utm_link2) ...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/api/internal/helper/openapi_controller_spec.rb
spec/controllers/api/internal/helper/openapi_controller_spec.rb
# frozen_string_literal: true require "spec_helper" require "shared_examples/authorized_helper_api_method" describe Api::Internal::Helper::OpenapiController do it "inherits from Api::Internal::Helper::BaseController" do expect(described_class.superclass).to eq(Api::Internal::Helper::BaseController) end des...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/api/internal/helper/base_controller_spec.rb
spec/controllers/api/internal/helper/base_controller_spec.rb
# frozen_string_literal: true require "spec_helper" describe Api::Internal::Helper::BaseController do include HelperAISpecHelper controller(described_class) do before_action :authorize_hmac_signature!, only: :index skip_before_action :authorize_helper_token!, only: :index def index render json...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/api/internal/helper/users_controller_spec.rb
spec/controllers/api/internal/helper/users_controller_spec.rb
# frozen_string_literal: true require "spec_helper" require "shared_examples/authorized_helper_api_method" describe Api::Internal::Helper::UsersController do include HelperAISpecHelper let(:user) { create(:user_with_compliance_info) } let(:admin_user) { create(:admin_user) } before do @params = { email:...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/api/internal/helper/payouts_controller_spec.rb
spec/controllers/api/internal/helper/payouts_controller_spec.rb
# frozen_string_literal: true require "spec_helper" require "shared_examples/authorized_helper_api_method" describe Api::Internal::Helper::PayoutsController do let(:user) { create(:compliant_user) } before do stub_const("GUMROAD_ADMIN_ID", create(:admin_user).id) end it "inherits from Api::Internal::Hel...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/api/internal/helper/purchases_controller_spec.rb
spec/controllers/api/internal/helper/purchases_controller_spec.rb
# frozen_string_literal: true require "spec_helper" require "shared_examples/authorized_helper_api_method" describe Api::Internal::Helper::PurchasesController, :vcr do include HelperAISpecHelper let(:buyer) { create(:user) } let(:admin_user) { create(:admin_user) } it "inherits from Api::Internal::Helper::B...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/api/internal/helper/instant_payouts_controller_spec.rb
spec/controllers/api/internal/helper/instant_payouts_controller_spec.rb
# frozen_string_literal: true require "spec_helper" require "shared_examples/authorized_helper_api_method" describe Api::Internal::Helper::InstantPayoutsController do let(:seller) { create(:user) } it "inherits from Api::Internal::Helper::BaseController" do expect(described_class.superclass).to eq(Api::Inter...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/api/internal/helper/webhook_controller_spec.rb
spec/controllers/api/internal/helper/webhook_controller_spec.rb
# frozen_string_literal: false require "spec_helper" describe Api::Internal::Helper::WebhookController do include HelperAISpecHelper it "inherits from Api::Internal::Helper::BaseController" do expect(described_class.superclass).to eq(Api::Internal::Helper::BaseController) end describe "POST handle" do ...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/api/internal/iffy/webhook_controller_spec.rb
spec/controllers/api/internal/iffy/webhook_controller_spec.rb
# frozen_string_literal: true require "spec_helper" describe Api::Internal::Iffy::WebhookController do include IffySpecHelper it "inherits from Api::Internal::BaseController" do expect(described_class.superclass).to eq(Api::Internal::BaseController) end describe "POST handle" do let(:timestamp) { (T...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/api/internal/product_review_videos/rejections_controller_spec.rb
spec/controllers/api/internal/product_review_videos/rejections_controller_spec.rb
# frozen_string_literal: true require "spec_helper" require "shared_examples/authentication_required" describe Api::Internal::ProductReviewVideos::RejectionsController do let!(:seller) { create(:user) } let(:buyer) { create(:user) } let(:product) { create(:product, user: seller) } let(:purchase) { create(:pur...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/api/internal/product_review_videos/approvals_controller_spec.rb
spec/controllers/api/internal/product_review_videos/approvals_controller_spec.rb
# frozen_string_literal: true require "spec_helper" require "shared_examples/authentication_required" describe Api::Internal::ProductReviewVideos::ApprovalsController do let!(:seller) { create(:user) } let(:buyer) { create(:user) } let(:product) { create(:product, user: seller) } let(:purchase) { create(:purc...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/api/internal/grmc/webhook_controller_spec.rb
spec/controllers/api/internal/grmc/webhook_controller_spec.rb
# frozen_string_literal: true require "spec_helper" describe Api::Internal::Grmc::WebhookController do it "inherits from Api::Internal::BaseController" do expect(described_class.superclass).to eq(Api::Internal::BaseController) end def sign_request(timestamp, json) hmac = OpenSSL::HMAC.hexdigest("sha256...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/api/v2/subscribers_controller_spec.rb
spec/controllers/api/v2/subscribers_controller_spec.rb
# frozen_string_literal: true require "spec_helper" require "shared_examples/authorized_oauth_v1_api_method" describe Api::V2::SubscribersController do before do @seller = create(:user) @subscriber = create(:user) @app = create(:oauth_application, owner: create(:user)) @product = create(:subscriptio...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/api/v2/skus_controller_spec.rb
spec/controllers/api/v2/skus_controller_spec.rb
# frozen_string_literal: true require "spec_helper" describe Api::V2::SkusController do before do @user = create(:user) @app = create(:oauth_application, owner: create(:user)) end describe "GET 'index'" do before do @product = create(:product, user: @user, description: "des", created_at: Time...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/api/v2/base_controller_spec.rb
spec/controllers/api/v2/base_controller_spec.rb
# frozen_string_literal: true require "spec_helper" describe Api::V2::BaseController do end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/api/v2/users_controller_spec.rb
spec/controllers/api/v2/users_controller_spec.rb
# frozen_string_literal: true require "spec_helper" require "net/http" require "shared_examples/authorized_oauth_v1_api_method" describe Api::V2::UsersController do before do @user = create(:user, username: "dude", email: "abc@def.ghi") @product = create(:product, user: @user) @purchase = create(:purcha...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/api/v2/offer_codes_controller_spec.rb
spec/controllers/api/v2/offer_codes_controller_spec.rb
# frozen_string_literal: true require "spec_helper" require "net/http" require "shared_examples/authorized_oauth_v1_api_method" describe Api::V2::OfferCodesController do before do @user = create(:user) @app = create(:oauth_application, owner: create(:user)) end describe "GET 'index'" do before do ...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/api/v2/notion_unfurl_urls_controller_spec.rb
spec/controllers/api/v2/notion_unfurl_urls_controller_spec.rb
# frozen_string_literal: true require "spec_helper" describe Api::V2::NotionUnfurlUrlsController do let!(:seller) { create(:user, username: "john") } let!(:product) { create(:product, name: "An ultimate guide to become a programmer!", description: "<p>Lorem ipsum</p>", user: seller) } let!(:access_token) { crea...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/api/v2/licenses_controller_spec.rb
spec/controllers/api/v2/licenses_controller_spec.rb
# frozen_string_literal: true require "spec_helper" describe Api::V2::LicensesController do include ActionView::Helpers::DateHelper before do travel_to(Time.current) @product = create(:product, is_licensed: true, custom_permalink: "max") @license = create(:license, link: @product) @purchase = cre...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
true
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/api/v2/payouts_controller_spec.rb
spec/controllers/api/v2/payouts_controller_spec.rb
# frozen_string_literal: true require "spec_helper" require "shared_examples/authorized_oauth_v1_api_method" describe Api::V2::PayoutsController do before do stub_const("ObfuscateIds::CIPHER_KEY", "a" * 32) stub_const("ObfuscateIds::NUMERIC_CIPHER_KEY", 123456789) @seller = create(:user) @other_sel...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/api/v2/links_controller_spec.rb
spec/controllers/api/v2/links_controller_spec.rb
# frozen_string_literal: true require "spec_helper" require "net/http" require "shared_examples/authorized_oauth_v1_api_method" describe Api::V2::LinksController do before do @user = create(:user) @app = create(:oauth_application, owner: create(:user)) end describe "GET 'index'" do before do ...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/api/v2/variant_categories_controller_spec.rb
spec/controllers/api/v2/variant_categories_controller_spec.rb
# frozen_string_literal: true require "spec_helper" require "net/http" require "shared_examples/authorized_oauth_v1_api_method" describe Api::V2::VariantCategoriesController do before do @user = create(:user) @app = create(:oauth_application, owner: create(:user)) end describe "GET 'index'" do befo...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/api/v2/sales_controller_spec.rb
spec/controllers/api/v2/sales_controller_spec.rb
# frozen_string_literal: true require "spec_helper" require "shared_examples/authorized_oauth_v1_api_method" describe Api::V2::SalesController do before do @seller = create(:user) @purchaser = create(:user) @app = create(:oauth_application, owner: create(:user)) @product = create(:product, user: @se...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/api/v2/custom_fields_controller_spec.rb
spec/controllers/api/v2/custom_fields_controller_spec.rb
# frozen_string_literal: true require "spec_helper" require "net/http" require "shared_examples/authorized_oauth_v1_api_method" describe Api::V2::CustomFieldsController do before do @user = create(:user) @app = create(:oauth_application, owner: create(:user)) @custom_fields = [create(:custom_field, name...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/api/v2/variants_controller_spec.rb
spec/controllers/api/v2/variants_controller_spec.rb
# frozen_string_literal: true require "spec_helper" require "net/http" require "shared_examples/authorized_oauth_v1_api_method" describe Api::V2::VariantsController do before do @user = create(:user) @app = create(:oauth_application, owner: create(:user)) end describe "GET 'index'" do before do ...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/api/v2/resource_subscriptions_controller_spec.rb
spec/controllers/api/v2/resource_subscriptions_controller_spec.rb
# frozen_string_literal: true require "spec_helper" require "net/http" require "shared_examples/authorized_oauth_v1_api_method" describe Api::V2::ResourceSubscriptionsController do before do @user = create(:user) @app = create(:oauth_application, owner: create(:user)) @token = create("doorkeeper/access_...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/checkout/form_controller_spec.rb
spec/controllers/checkout/form_controller_spec.rb
# frozen_string_literal: true require "spec_helper" require "shared_examples/sellers_base_controller_concern" require "shared_examples/authorize_called" describe Checkout::FormController do render_views let(:seller) { create(:named_seller) } let(:pundit_user) { SellerContext.new(user: seller, seller:) } it_...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/checkout/discounts_controller_spec.rb
spec/controllers/checkout/discounts_controller_spec.rb
# frozen_string_literal: true require "spec_helper" require "shared_examples/sellers_base_controller_concern" require "shared_examples/authorize_called" describe Checkout::DiscountsController do render_views let(:seller) { create(:named_seller) } def transform_offer_code_props(offer_code_props) offer_code...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/checkout/upsells_controller_spec.rb
spec/controllers/checkout/upsells_controller_spec.rb
# frozen_string_literal: true require "spec_helper" require "shared_examples/sellers_base_controller_concern" require "shared_examples/authorize_called" describe Checkout::UpsellsController 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/checkout/upsells/pauses_controller_spec.rb
spec/controllers/checkout/upsells/pauses_controller_spec.rb
# frozen_string_literal: true require "spec_helper" require "shared_examples/sellers_base_controller_concern" require "shared_examples/authorize_called" describe Checkout::Upsells::PausesController do it_behaves_like "inherits from Sellers::BaseController" let(:seller) { create(:named_seller, :eligible_for_servi...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/checkout/upsells/products_controller_spec.rb
spec/controllers/checkout/upsells/products_controller_spec.rb
# frozen_string_literal: true require "spec_helper" describe Checkout::Upsells::ProductsController do let(:seller) { create(:named_seller) } let!(:product1) { create(:product, :recommendable, user: seller, name: "Product 1", price_cents: 1000, price_currency_type: "usd", native_type: "digital") } let!(:product2...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/oauth/applications_controller_spec.rb
spec/controllers/oauth/applications_controller_spec.rb
# frozen_string_literal: true require "spec_helper" require "shared_examples/authorize_called" require "inertia_rails/rspec" describe Oauth::ApplicationsController, type: :controller, inertia: true do shared_examples_for "redirects to page with OAuth apps" do it "redirects to settings_advanced_path" do ra...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/oauth/authorized_applications_controller_spec.rb
spec/controllers/oauth/authorized_applications_controller_spec.rb
# frozen_string_literal: true require "spec_helper" require "shared_examples/authorize_called" describe Oauth::AuthorizedApplicationsController do before do @user = create(:user) @application = create(:oauth_application, owner: @user) create("doorkeeper/access_token", resource_owner_id: @user.id, applic...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/oauth/access_tokens_constroller_spec.rb
spec/controllers/oauth/access_tokens_constroller_spec.rb
# frozen_string_literal: true require "spec_helper" require "shared_examples/sellers_base_controller_concern" require "shared_examples/authorize_called" describe Oauth::AccessTokensController do it_behaves_like "inherits from Sellers::BaseController" let(:seller) { create(:named_seller) } include_context "wit...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/oauth/tokens_controller_spec.rb
spec/controllers/oauth/tokens_controller_spec.rb
# frozen_string_literal: true require "spec_helper" describe Oauth::TokensController do let(:password) { Devise.friendly_token[0, 20] } let(:user) { create(:user, password:, password_confirmation: password) } let(:application) { create(:oauth_application) } context "when the user is active" do it "return...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/oauth/notion/authorizations_controller_spec.rb
spec/controllers/oauth/notion/authorizations_controller_spec.rb
# frozen_string_literal: true require "spec_helper" describe Oauth::Notion::AuthorizationsController do describe "GET new" do let(:user) { create(:user) } let(:oauth_application) { create(:oauth_application, owner: user, scopes: "unfurl", redirect_uri: "https://example.com") } before do sign_in u...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/products/other_refund_policies_controller_spec.rb
spec/controllers/products/other_refund_policies_controller_spec.rb
# frozen_string_literal: true require "spec_helper" require "shared_examples/sellers_base_controller_concern" require "shared_examples/authorize_called" describe Products::OtherRefundPoliciesController do it_behaves_like "inherits from Sellers::BaseController" let(:seller) { create(:named_seller) } include_co...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/products/affiliated_controller_spec.rb
spec/controllers/products/affiliated_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 Products::AffiliatedController, inertia: true do include CurrencyHelper render_views it_behaves_like "inherits from Sel...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/products/product_files_utility_controller_spec.rb
spec/controllers/products/product_files_utility_controller_spec.rb
# frozen_string_literal: true require "spec_helper" require "shared_examples/authorize_called" describe ProductFilesUtilityController, :vcr do describe "GET external_link_title", :skip_ssrf_stub do before do @user = create(:user) sign_in @user end it "extracts title if valid url is passed" ...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/products/archived_controller_spec.rb
spec/controllers/products/archived_controller_spec.rb
# frozen_string_literal: true require "spec_helper" require "shared_examples/sellers_base_controller_concern" require "shared_examples/authorize_called" require "shared_examples/with_sorting_and_pagination" require "inertia_rails/rspec" describe Products::ArchivedController, inertia: true do render_views it_beha...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/products/mobile_tracking_controller_spec.rb
spec/controllers/products/mobile_tracking_controller_spec.rb
# frozen_string_literal: true require "spec_helper" describe Products::MobileTrackingController do describe "GET show" do let(:product) { create(:product) } it "assigns props for tracking" do expect(MobileTrackingPresenter).to receive(:new).with(seller: product.user).and_call_original get :sho...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/products/collabs_controller_spec.rb
spec/controllers/products/collabs_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 Products::CollabsController, :vcr, :sidekiq_inline, :elasticsearch_wait_for_refresh, inertia: true do include CurrencyHelper...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/products/variants_controller_spec.rb
spec/controllers/products/variants_controller_spec.rb
# frozen_string_literal: true require "spec_helper" require "shared_examples/authorize_called" require "shared_examples/sellers_base_controller_concern" describe Products::VariantsController do it_behaves_like "inherits from Sellers::BaseController" let(:seller) { create(:named_seller) } include_context "with...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/products/remaining_call_availabilities_controller_spec.rb
spec/controllers/products/remaining_call_availabilities_controller_spec.rb
# frozen_string_literal: true require "spec_helper" describe Products::RemainingCallAvailabilitiesController do describe "GET #index" do context "when the product is a call product" do let(:call_product) { create(:call_product) } let!(:call_availability) { create(:call_availability, call: call_produ...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/sellers/base_controller_spec.rb
spec/controllers/sellers/base_controller_spec.rb
# frozen_string_literal: true require "spec_helper" describe Sellers::BaseController do describe "authenticate_user!" do controller(Sellers::BaseController) do def index skip_authorization head :no_content end end let(:path_placeholder) { "/settings" } before do @...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/sellers/switch_controller_spec.rb
spec/controllers/sellers/switch_controller_spec.rb
# frozen_string_literal: true require "spec_helper" require "shared_examples/sellers_base_controller_concern" describe Sellers::SwitchController do it_behaves_like "inherits from Sellers::BaseController" let(:user) { create(:user) } let(:seller) { create(:named_seller) } describe "POST create" do before...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/users/oauth_controller_spec.rb
spec/controllers/users/oauth_controller_spec.rb
# frozen_string_literal: true require "spec_helper" describe Users::OauthController do render_views end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/global_affiliates/product_eligibility_controller_spec.rb
spec/controllers/global_affiliates/product_eligibility_controller_spec.rb
# frozen_string_literal: true require "spec_helper" require "shared_examples/sellers_base_controller_concern" require "shared_examples/authorize_called" describe GlobalAffiliates::ProductEligibilityController do it_behaves_like "inherits from Sellers::BaseController" let(:seller) { create(:named_seller) } inc...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/gumroad_blog/posts_controller_spec.rb
spec/controllers/gumroad_blog/posts_controller_spec.rb
# frozen_string_literal: true require "spec_helper" require "shared_examples/authorize_called" describe GumroadBlog::PostsController do let(:blog_owner) { create(:user, username: "gumroad") } describe "GET index" do let!(:published_post_1) do create( :audience_post, :published, ...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/product_review_videos/upload_contexts_controller_spec.rb
spec/controllers/product_review_videos/upload_contexts_controller_spec.rb
# frozen_string_literal: true require "spec_helper" require "shared_examples/authentication_required" describe ProductReviewVideos::UploadContextsController do describe "GET show" do let(:user) { create(:user) } it_behaves_like "authentication required for action", :get, :show context "when user is au...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/product_review_videos/streams_controller_spec.rb
spec/controllers/product_review_videos/streams_controller_spec.rb
# frozen_string_literal: true require "spec_helper" describe ProductReviewVideos::StreamsController do describe "GET show" do let(:smil_xml) { '<smil><body><switch><video src="sample.mp4" /></switch></body></smil>' } let!(:product_review_video) { create(:product_review_video) } context "when the video ...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/product_review_videos/streaming_urls_controller_spec.rb
spec/controllers/product_review_videos/streaming_urls_controller_spec.rb
# frozen_string_literal: true require "spec_helper" RSpec.describe ProductReviewVideos::StreamingUrlsController, type: :controller do let(:seller) { create(:user) } let(:purchaser) { create(:user) } let(:link) { create(:product, user: seller) } let(:purchase) { create(:purchase, seller:, purchaser:, link:) }...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/discover/search_autocomplete_controller_spec.rb
spec/controllers/discover/search_autocomplete_controller_spec.rb
# frozen_string_literal: true require "spec_helper" describe Discover::SearchAutocompleteController do render_views describe "#search_autocomplete" do context "when query is blank" do it "returns empty array" do create(:product) index_model_records(Link) get :search, params: { q...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/discover/recommended_wishlists_controller_spec.rb
spec/controllers/discover/recommended_wishlists_controller_spec.rb
# frozen_string_literal: true require "spec_helper" describe Discover::RecommendedWishlistsController do describe "GET #index" do let(:user) { create(:user) } let(:wishlists) { Wishlist.where(id: create_list(:wishlist, 4).map(&:id)) } let(:taxonomy) { Taxonomy.last } before do sign_in user ...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/wishlists/following_controller_spec.rb
spec/controllers/wishlists/following_controller_spec.rb
# frozen_string_literal: true require "spec_helper" require "shared_examples/authorize_called" require "inertia_rails/rspec" describe Wishlists::FollowingController, type: :controller, inertia: true do let(:user) { create(:user) } describe "GET index" do before do sign_in(user) end it_behaves_...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/wishlists/followers_controller_spec.rb
spec/controllers/wishlists/followers_controller_spec.rb
# frozen_string_literal: true require "spec_helper" require "shared_examples/authorize_called" describe Wishlists::FollowersController do let(:user) { create(:user) } let(:wishlist) { create(:wishlist) } before do sign_in(user) end describe "POST create" do it_behaves_like "authorize called for ac...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/controllers/wishlists/products_controller_spec.rb
spec/controllers/wishlists/products_controller_spec.rb
# frozen_string_literal: true require "spec_helper" require "shared_examples/authorize_called" describe Wishlists::ProductsController do let(:user) { create(:user) } let(:wishlist) { create(:wishlist, user: user) } before do sign_in(user) end describe "POST create" do let(:product) { create(:produ...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/models/product_review_response_spec.rb
spec/models/product_review_response_spec.rb
# frozen_string_literal: true require "spec_helper" describe ProductReviewResponse do let(:product_review) { create(:product_review) } describe "validations" do it { is_expected.to validate_presence_of(:message) } end describe "after_create_commit" do it "sends an email to the reviewer after creatio...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/models/google_calendar_integration_spec.rb
spec/models/google_calendar_integration_spec.rb
# frozen_string_literal: true require "spec_helper" describe GoogleCalendarIntegration do it "creates the correct json details" do integration = create(:google_calendar_integration) GoogleCalendarIntegration::INTEGRATION_DETAILS.each do |detail| expect(integration.respond_to?(detail)).to eq true e...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/models/email_info_spec.rb
spec/models/email_info_spec.rb
# frozen_string_literal: true require "spec_helper" describe EmailInfo do describe "#unsubscribe_buyer" do let(:purchase) { create(:purchase) } describe "for a Purchase" do let(:email_info) { create(:customer_email_info, email_name: SendgridEventInfo::RECEIPT_MAILER_METHOD, purchase: purchase) } ...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/models/subscription_event_spec.rb
spec/models/subscription_event_spec.rb
# frozen_string_literal: true require "spec_helper" describe SubscriptionEvent do describe "creation" do it "sets the seller" do subscription_event = create(:subscription_event) expect(subscription_event.seller).to eq(subscription_event.subscription.seller) end it "validates the consecutive...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/models/san_marino_bank_account_spec.rb
spec/models/san_marino_bank_account_spec.rb
# frozen_string_literal: true require "spec_helper" describe SanMarinoBankAccount do describe "#bank_account_type" do it "returns SM" do expect(create(:san_marino_bank_account).bank_account_type).to eq("SM") end end describe "#country" do it "returns SM" do expect(create(:san_marino_ban...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/models/mozambique_bank_account_spec.rb
spec/models/mozambique_bank_account_spec.rb
# frozen_string_literal: true describe MozambiqueBankAccount do describe "#bank_account_type" do it "returns MZ" do expect(create(:mozambique_bank_account).bank_account_type).to eq("MZ") end end describe "#country" do it "returns MZ" do expect(create(:mozambique_bank_account).country).to...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/models/custom_domain_spec.rb
spec/models/custom_domain_spec.rb
# frozen_string_literal: true require "spec_helper" describe CustomDomain do describe "#validate_domain_format" do context "with a valid domain name" do before do @valid_domains = ["example.com", "example-store2.com", "test.example.com", "test-store.example.com"] end it "saves the doma...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/models/tunisia_bank_account_spec.rb
spec/models/tunisia_bank_account_spec.rb
# frozen_string_literal: true describe TunisiaBankAccount do describe "#bank_account_type" do it "returns Tunisia" do expect(create(:tunisia_bank_account).bank_account_type).to eq("TN") end end describe "#country" do it "returns TN" do expect(create(:tunisia_bank_account).country).to eq(...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/models/public_file_spec.rb
spec/models/public_file_spec.rb
# frozen_string_literal: true require "spec_helper" describe PublicFile do describe "associations" do it { is_expected.to belong_to(:seller).class_name("User").optional } it { is_expected.to belong_to(:resource).optional(false) } it { is_expected.to have_one_attached(:file) } end describe "validati...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/models/argentina_bank_account_spec.rb
spec/models/argentina_bank_account_spec.rb
# frozen_string_literal: true require "spec_helper" describe ArgentinaBankAccount do describe "#bank_account_type" do it "returns argentina" do expect(create(:argentina_bank_account).bank_account_type).to eq("AR") end end describe "#country" do it "returns AR" do expect(create(:argentin...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/models/sales_export_chunk_spec.rb
spec/models/sales_export_chunk_spec.rb
# frozen_string_literal: true require "spec_helper" RSpec.describe SalesExportChunk do it "can be created" do create(:sales_export_chunk) end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/models/colombia_bank_account_spec.rb
spec/models/colombia_bank_account_spec.rb
# frozen_string_literal: true require "spec_helper" describe ColombiaBankAccount do describe "#bank_account_type" do it "returns Colombia" do expect(create(:colombia_bank_account).bank_account_type).to eq("CO") end end describe "#country" do it "returns CO" do expect(create(:colombia_ba...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/models/subscription_plan_change_spec.rb
spec/models/subscription_plan_change_spec.rb
# frozen_string_literal: true require "spec_helper" describe SubscriptionPlanChange do describe "validations" do it "validates presence of tier for a tiered membership" do subscription = create(:subscription, link: create(:membership_product)) record = build(:subscription_plan_change, subscription:,...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/models/qatar_bank_account_spec.rb
spec/models/qatar_bank_account_spec.rb
# frozen_string_literal: true require "spec_helper" describe QatarBankAccount do describe "#bank_account_type" do it "returns QA" do expect(create(:qatar_bank_account).bank_account_type).to eq("QA") end end describe "#country" do it "returns QA" do expect(create(:qatar_bank_account).cou...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/models/community_chat_message_spec.rb
spec/models/community_chat_message_spec.rb
# frozen_string_literal: true require "spec_helper" RSpec.describe CommunityChatMessage do subject(:community_chat_message) { build(:community_chat_message) } describe "associations" do it { is_expected.to belong_to(:community) } it { is_expected.to belong_to(:user) } it { is_expected.to have_many(:l...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/models/product_review_spec.rb
spec/models/product_review_spec.rb
# frozen_string_literal: true require "spec_helper" describe ProductReview do it "enforces the rating to lie within a specific range" do ProductReview::PRODUCT_RATING_RANGE.each do |rating| expect(create(:product_review, rating:)).to be_valid end product_review = build(:product_review, rating: 0)...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/models/merchant_account_spec.rb
spec/models/merchant_account_spec.rb
# frozen_string_literal: true require "spec_helper" describe MerchantAccount do describe ".paypal" do it "returns records with the paypal charge processor id" do MerchantAccount.destroy_all create(:merchant_account) create(:merchant_account_paypal, charge_processor_id: BraintreeChargeProcessor...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/spec/models/angola_bank_account_spec.rb
spec/models/angola_bank_account_spec.rb
# frozen_string_literal: true require "spec_helper" describe AngolaBankAccount do describe "#bank_account_type" do it "returns AO" do expect(create(:angola_bank_account).bank_account_type).to eq("AO") end end describe "#country" do it "returns AO" do expect(create(:angola_bank_account)....
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false