source stringclasses 1
value | repo stringlengths 5 63 | repo_url stringlengths 24 82 | path stringlengths 5 167 | language stringclasses 1
value | license stringclasses 5
values | stars int64 10 51.4k | ref stringclasses 23
values | size_bytes int64 200 258k | text stringlengths 137 258k |
|---|---|---|---|---|---|---|---|---|---|
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/products/archived_controller_spec.rb | Ruby | mit | 8,966 | main | 6,535 | # 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... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/products/affiliated_controller_spec.rb | Ruby | mit | 8,966 | main | 6,890 | # 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... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/products/variants_controller_spec.rb | Ruby | mit | 8,966 | main | 3,432 | # 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... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/products/product_files_utility_controller_spec.rb | Ruby | mit | 8,966 | main | 8,453 | # 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" ... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/communities/chat_messages_controller_spec.rb | Ruby | mit | 8,966 | main | 16,078 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/sellers_base_controller_concern"
require "shared_examples/authorize_called"
describe Communities::ChatMessagesController do
let(:seller) { create(:user) }
let(:product) { create(:product, user: seller, community_chat_enabled: true) }
l... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/communities/notification_settings_controller_spec.rb | Ruby | mit | 8,966 | main | 4,411 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/sellers_base_controller_concern"
require "shared_examples/authorize_called"
describe Communities::NotificationSettingsController do
let(:seller) { create(:user) }
let(:product) { create(:product, user: seller, community_chat_enabled: tru... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/communities/last_read_chat_messages_controller_spec.rb | Ruby | mit | 8,966 | main | 7,515 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/sellers_base_controller_concern"
require "shared_examples/authorize_called"
describe Communities::LastReadChatMessagesController do
let(:seller) { create(:user) }
let(:product) { create(:product, user: seller, community_chat_enabled: tru... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/affiliate_requests/onboarding_form_controller_spec.rb | Ruby | mit | 8,966 | main | 6,768 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/authorize_called"
require "shared_examples/sellers_base_controller_concern"
describe AffiliateRequests::OnboardingFormController do
it_behaves_like "inherits from Sellers::BaseController"
let(:seller) { create(:named_seller) }
let(:pu... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/subscriptions/magic_links_controller_spec.rb | Ruby | mit | 8,966 | main | 5,469 | # frozen_string_literal: true
require "spec_helper"
require "inertia_rails/rspec"
describe Subscriptions::MagicLinksController, inertia: true do
let(:seller) { create(:named_seller) }
let(:subscriber) { create(:user) }
before do
@product = create(:membership_product, subscription_duration: "monthly", user:... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/sellers/switch_controller_spec.rb | Ruby | mit | 8,966 | main | 1,655 | # 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... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/sellers/base_controller_spec.rb | Ruby | mit | 8,966 | main | 1,160 | # 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
@... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/admin/paydays_controller_spec.rb | Ruby | mit | 8,966 | main | 2,740 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/admin_base_controller_concern"
describe Admin::PaydaysController do
it_behaves_like "inherits from Admin::BaseController"
let(:next_scheduled_payout_end_date) { User::PayoutSchedule.next_scheduled_payout_end_date }
before do
user... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/admin/links_controller_spec.rb | Ruby | mit | 8,966 | main | 6,479 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/admin_base_controller_concern"
require "inertia_rails/rspec"
describe Admin::LinksController, type: :controller, inertia: true do
render_views
it_behaves_like "inherits from Admin::BaseController"
let(:admin_user) { create(:admin_use... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/admin/scheduled_payouts_controller_spec.rb | Ruby | mit | 8,966 | main | 4,333 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/admin_base_controller_concern"
require "inertia_rails/rspec"
describe Admin::ScheduledPayoutsController, type: :controller, inertia: true do
it_behaves_like "inherits from Admin::BaseController"
let(:admin_user) { create(:admin_user) }
... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/admin/purchases_controller_spec.rb | Ruby | mit | 8,966 | main | 8,265 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/admin_base_controller_concern"
require "inertia_rails/rspec"
describe Admin::PurchasesController, :vcr, inertia: true do
it_behaves_like "inherits from Admin::BaseController"
before do
@admin_user = create(:admin_user)
sign_in @... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/admin/block_email_domains_controller_spec.rb | Ruby | mit | 8,966 | main | 2,390 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/admin_base_controller_concern"
require "inertia_rails/rspec"
describe Admin::BlockEmailDomainsController, type: :controller, inertia: true do
render_views
it_behaves_like "inherits from Admin::BaseController"
let(:admin_user) { creat... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/admin/unblock_email_domains_controller_spec.rb | Ruby | mit | 8,966 | main | 1,481 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/admin_base_controller_concern"
require "inertia_rails/rspec"
describe Admin::UnblockEmailDomainsController, type: :controller, inertia: true do
render_views
it_behaves_like "inherits from Admin::BaseController"
let(:non_admin_user) {... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/admin/action_call_dashboard_controller_spec.rb | Ruby | mit | 8,966 | main | 1,155 | # frozen_string_literal: true
require "spec_helper"
require "inertia_rails/rspec"
require "shared_examples/admin_base_controller_concern"
describe Admin::ActionCallDashboardController, type: :controller, inertia: true do
render_views
it_behaves_like "inherits from Admin::BaseController"
let(:admin_user) { cre... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/admin/unreviewed_users_controller_spec.rb | Ruby | mit | 8,966 | main | 2,972 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/admin_base_controller_concern"
require "inertia_rails/rspec"
describe Admin::UnreviewedUsersController, type: :controller, inertia: true do
render_views
it_behaves_like "inherits from Admin::BaseController"
let(:admin) { create(:admi... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/admin/guids_controller_spec.rb | Ruby | mit | 8,966 | main | 2,875 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/admin_base_controller_concern"
require "inertia_rails/rspec"
describe Admin::GuidsController, type: :controller, inertia: true do
render_views
it_behaves_like "inherits from Admin::BaseController"
let(:user1) { create(:user) }
let(... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/admin/users_controller_spec.rb | Ruby | mit | 8,966 | main | 17,137 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/admin_base_controller_concern"
require "inertia_rails/rspec"
describe Admin::UsersController, type: :controller, inertia: true do
render_views
it_behaves_like "inherits from Admin::BaseController"
before do
@admin_user = create(:... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/admin/payouts_controller_spec.rb | Ruby | mit | 8,966 | main | 2,092 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/admin_base_controller_concern"
require "inertia_rails/rspec"
describe Admin::PayoutsController, type: :controller, inertia: true do
it_behaves_like "inherits from Admin::BaseController"
let(:admin_user) { create(:admin_user) }
let(:pa... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/admin/sales_reports_controller_spec.rb | Ruby | mit | 8,966 | main | 4,258 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/admin_base_controller_concern"
require "inertia_rails/rspec"
describe Admin::SalesReportsController, type: :controller, inertia: true do
render_views
it_behaves_like "inherits from Admin::BaseController"
let(:admin_user) { create(:ad... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/admin/affiliates_controller_spec.rb | Ruby | mit | 8,966 | main | 3,984 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/admin_base_controller_concern"
require "inertia_rails/rspec"
describe Admin::AffiliatesController, inertia: true do
render_views
it_behaves_like "inherits from Admin::BaseController"
before do
@admin_user = create(:admin_user)
... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/admin/helper_actions_controller_spec.rb | Ruby | mit | 8,966 | main | 2,105 | # frozen_string_literal: true
RSpec.describe Admin::HelperActionsController do
let(:admin) { create(:admin_user) }
let(:user) { create(:user) }
describe "GET impersonate" do
it "redirects to admin impersonation when authenticated as admin" do
sign_in(admin)
get :impersonate, params: { user_exte... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/admin/merchant_accounts_controller_spec.rb | Ruby | mit | 8,966 | main | 1,439 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/admin_base_controller_concern"
require "inertia_rails/rspec"
describe Admin::MerchantAccountsController, type: :controller, inertia: true do
render_views
it_behaves_like "inherits from Admin::BaseController"
let(:admin_user) { create... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/admin/base_controller_spec.rb | Ruby | mit | 8,966 | main | 5,863 | # frozen_string_literal: true
require "spec_helper"
require "inertia_rails/rspec"
describe Admin::BaseController, type: :controller, inertia: true do
render_views
class DummyPolicy < ApplicationPolicy
def index_with_policy?
false
end
end
controller(Admin::BaseController) do
def index_with_p... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/admin/comments_controller_spec.rb | Ruby | mit | 8,966 | main | 1,078 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/admin_base_controller_concern"
describe Admin::CommentsController do
it_behaves_like "inherits from Admin::BaseController"
describe "POST create" do
let(:user) { create(:user) }
let(:comment_attrs) do
{ content: "comment c... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/admin/suspend_users_controller_spec.rb | Ruby | mit | 8,966 | main | 5,319 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/admin_base_controller_concern"
require "inertia_rails/rspec"
describe Admin::SuspendUsersController, type: :controller, inertia: true do
render_views
it_behaves_like "inherits from Admin::BaseController"
let(:admin_user) { create(:ad... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/admin/affiliates/products_controller_spec.rb | Ruby | mit | 8,966 | main | 1,723 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/admin_base_controller_concern"
require "inertia_rails/rspec"
describe Admin::Affiliates::ProductsController, inertia: true do
render_views
it_behaves_like "inherits from Admin::BaseController"
let(:admin_user) { create(:admin_user) }... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/admin/affiliates/products/purchases_controller_spec.rb | Ruby | mit | 8,966 | main | 4,335 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/admin_base_controller_concern"
describe Admin::Affiliates::Products::PurchasesController do
it_behaves_like "inherits from Admin::BaseController"
let(:admin_user) { create(:admin_user) }
before do
sign_in admin_user
end
desc... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/admin/products/comments_controller_spec.rb | Ruby | mit | 8,966 | main | 470 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/admin_base_controller_concern"
require "shared_examples/admin_commentable_concern"
describe Admin::Products::CommentsController do
it_behaves_like "inherits from Admin::BaseController"
let(:product) { create(:product) }
it_behaves_li... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/admin/products/infos_controller_spec.rb | Ruby | mit | 8,966 | main | 605 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/admin_base_controller_concern"
describe Admin::Products::InfosController do
it_behaves_like "inherits from Admin::BaseController"
let(:admin_user) { create(:admin_user) }
before do
sign_in admin_user
end
describe "GET show" ... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/admin/products/details_controller_spec.rb | Ruby | mit | 8,966 | main | 613 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/admin_base_controller_concern"
describe Admin::Products::DetailsController do
it_behaves_like "inherits from Admin::BaseController"
let(:admin_user) { create(:admin_user) }
before do
sign_in admin_user
end
describe "GET show... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/admin/products/purchases_controller_spec.rb | Ruby | mit | 8,966 | main | 4,351 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/admin_base_controller_concern"
describe Admin::Products::PurchasesController do
it_behaves_like "inherits from Admin::BaseController"
let(:admin_user) { create(:admin_user) }
before do
sign_in admin_user
end
describe "GET in... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/admin/products/staff_picked_controller_spec.rb | Ruby | mit | 8,966 | main | 1,435 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/admin_base_controller_concern"
require "shared_examples/authorize_called"
describe Admin::Products::StaffPickedController do
it_behaves_like "inherits from Admin::BaseController"
let(:admin_user) { create(:admin_user) }
before do
... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/admin/purchases/comments_controller_spec.rb | Ruby | mit | 8,966 | main | 476 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/admin_base_controller_concern"
require "shared_examples/admin_commentable_concern"
describe Admin::Purchases::CommentsController do
it_behaves_like "inherits from Admin::BaseController"
let(:purchase) { create(:purchase) }
it_behaves... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/admin/compliance/cards_controller_spec.rb | Ruby | mit | 8,966 | main | 1,939 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/admin_base_controller_concern"
describe Admin::Compliance::CardsController do
it_behaves_like "inherits from Admin::BaseController"
before do
@admin_user = create(:admin_user)
sign_in @admin_user
end
describe "POST refund" ... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/admin/users/email_changes_controller_spec.rb | Ruby | mit | 8,966 | main | 2,001 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/admin_base_controller_concern"
describe Admin::Users::EmailChangesController do
it_behaves_like "inherits from Admin::BaseController"
let(:admin_user) { create(:admin_user) }
let(:user) { create(:user, email: "oldemail@example.com", p... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/admin/users/products_controller_spec.rb | Ruby | mit | 8,966 | main | 1,718 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/admin_base_controller_concern"
require "inertia_rails/rspec"
describe Admin::Users::ProductsController, inertia: true do
render_views
it_behaves_like "inherits from Admin::BaseController"
let(:admin_user) { create(:admin_user) }
le... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/admin/users/payout_infos_controller_spec.rb | Ruby | mit | 8,966 | main | 637 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/admin_base_controller_concern"
describe Admin::Users::PayoutInfosController do
it_behaves_like "inherits from Admin::BaseController"
let(:admin_user) { create(:admin_user) }
let(:user) { create(:user) }
before do
sign_in admin_... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/admin/users/latest_posts_controller_spec.rb | Ruby | mit | 8,966 | main | 1,019 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/admin_base_controller_concern"
describe Admin::Users::LatestPostsController do
it_behaves_like "inherits from Admin::BaseController"
let(:admin_user) { create(:admin_user) }
let(:user) { create(:user) }
before do
sign_in admin_... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/admin/users/payouts_controller_spec.rb | Ruby | mit | 8,966 | main | 5,217 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/admin_base_controller_concern"
require "inertia_rails/rspec"
describe Admin::Users::PayoutsController, type: :controller, inertia: true do
it_behaves_like "inherits from Admin::BaseController"
let(:admin_user) { create(:admin_user) }
... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/admin/users/merchant_accounts_controller_spec.rb | Ruby | mit | 8,966 | main | 2,833 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/admin_base_controller_concern"
describe Admin::Users::MerchantAccountsController do
it_behaves_like "inherits from Admin::BaseController"
let(:admin_user) { create(:admin_user) }
let(:user) { create(:user) }
before do
sign_in a... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/admin/users/stats_controller_spec.rb | Ruby | mit | 8,966 | main | 799 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/admin_base_controller_concern"
describe Admin::Users::StatsController do
it_behaves_like "inherits from Admin::BaseController"
let(:admin_user) { create(:admin_user) }
let(:user) { create(:user) }
before do
sign_in admin_user
... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/admin/users/comments_controller_spec.rb | Ruby | mit | 8,966 | main | 452 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/admin_base_controller_concern"
require "shared_examples/admin_commentable_concern"
describe Admin::Users::CommentsController do
it_behaves_like "inherits from Admin::BaseController"
let(:user) { create(:user) }
it_behaves_like "Admin... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/admin/users/guids_controller_spec.rb | Ruby | mit | 8,966 | main | 2,446 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/admin_base_controller_concern"
describe Admin::Users::GuidsController do
it_behaves_like "inherits from Admin::BaseController"
let(:user1) { create(:user) }
let(:user2) { create(:user) }
let(:user3) { create(:user) }
let(:browser_... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/admin/users/products/tos_violation_flags_controller_spec.rb | Ruby | mit | 8,966 | main | 5,046 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/admin_base_controller_concern"
describe Admin::Users::Products::TosViolationFlagsController do
it_behaves_like "inherits from Admin::BaseController"
let(:admin_user) { create(:admin_user) }
let(:user_risk_state) { :flagged_for_tos_vio... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/admin/search/users_controller_spec.rb | Ruby | mit | 8,966 | main | 2,917 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/admin_base_controller_concern"
require "inertia_rails/rspec"
describe Admin::Search::UsersController, type: :controller, inertia: true do
render_views
it_behaves_like "inherits from Admin::BaseController"
let(:admin_user) { create(:a... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/admin/search/purchases_controller_spec.rb | Ruby | mit | 8,966 | main | 5,722 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/admin_base_controller_concern"
require "inertia_rails/rspec"
describe Admin::Search::PurchasesController, type: :controller, inertia: true do
render_views
it_behaves_like "inherits from Admin::BaseController"
before do
sign_in cr... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/settings/billing_controller_spec.rb | Ruby | mit | 8,966 | main | 3,162 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/sellers_base_controller_concern"
require "shared_examples/authorize_called"
require "inertia_rails/rspec"
describe Settings::BillingController, type: :controller, inertia: true do
it_behaves_like "inherits from Sellers::BaseController"
... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/settings/payments_controller_spec.rb | Ruby | mit | 8,966 | main | 76,962 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/sellers_base_controller_concern"
require "shared_examples/authorize_called"
require "inertia_rails/rspec"
describe Settings::PaymentsController, :vcr, type: :controller, inertia: true do
it_behaves_like "inherits from Sellers::BaseControll... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/settings/profile_controller_spec.rb | Ruby | mit | 8,966 | main | 6,870 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/sellers_base_controller_concern"
require "shared_examples/authorize_called"
require "inertia_rails/rspec"
describe Settings::ProfileController, :vcr, type: :controller, inertia: true do
let(:seller) { create(:named_seller) }
let(:pundit_... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/settings/main_controller_spec.rb | Ruby | mit | 8,966 | main | 21,834 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/sellers_base_controller_concern"
require "shared_examples/authorize_called"
require "inertia_rails/rspec"
describe Settings::MainController, type: :controller, inertia: true do
it_behaves_like "inherits from Sellers::BaseController"
let... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/settings/authorized_applications_controller_spec.rb | Ruby | mit | 8,966 | main | 1,341 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/sellers_base_controller_concern"
require "shared_examples/authorize_called"
require "inertia_rails/rspec"
describe Settings::AuthorizedApplicationsController, type: :controller, inertia: true do
it_behaves_like "inherits from Sellers::Base... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/settings/dismiss_ai_product_generation_promos_controller_spec.rb | Ruby | mit | 8,966 | main | 1,515 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/sellers_base_controller_concern"
require "shared_examples/authorize_called"
describe Settings::DismissAiProductGenerationPromosController do
it_behaves_like "inherits from Sellers::BaseController"
let(:seller) { create(:named_seller) }
... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/settings/team_controller_spec.rb | Ruby | mit | 8,966 | main | 2,003 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/sellers_base_controller_concern"
require "shared_examples/authorize_called"
require "inertia_rails/rspec"
describe Settings::TeamController, type: :controller, inertia: true do
it_behaves_like "inherits from Sellers::BaseController"
let... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/settings/advanced_controller_spec.rb | Ruby | mit | 8,966 | main | 13,803 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/sellers_base_controller_concern"
require "shared_examples/authorize_called"
require "inertia_rails/rspec"
describe Settings::AdvancedController, :vcr, type: :controller, inertia: true do
it_behaves_like "inherits from Sellers::BaseControll... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/settings/stripe_controller_spec.rb | Ruby | mit | 8,966 | main | 2,528 | # frozen_string_literal: true
require "spec_helper"
describe Settings::StripeController, :vcr do
describe "POST disconnect" do
before do
@creator = create(:user)
create(:user_compliance_info, user: @creator)
Feature.activate_user(:merchant_migration, @creator)
create(:merchant_account_s... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/settings/totp_controller_spec.rb | Ruby | mit | 8,966 | main | 5,626 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/sellers_base_controller_concern"
require "shared_examples/authorize_called"
describe Settings::TotpController, type: :controller do
it_behaves_like "inherits from Sellers::BaseController"
let(:user) { create(:user) }
before do
si... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/settings/password_controller_spec.rb | Ruby | mit | 8,966 | main | 3,577 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/sellers_base_controller_concern"
require "shared_examples/authorize_called"
require "inertia_rails/rspec"
describe Settings::PasswordController, :vcr, type: :controller, inertia: true do
it_behaves_like "inherits from Sellers::BaseControll... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/settings/third_party_analytics_controller_spec.rb | Ruby | mit | 8,966 | main | 4,704 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/sellers_base_controller_concern"
require "shared_examples/authorize_called"
require "inertia_rails/rspec"
describe Settings::ThirdPartyAnalyticsController, type: :controller, inertia: true do
let(:seller) { create(:named_seller) }
inclu... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/settings/profile/products_controller_spec.rb | Ruby | mit | 8,966 | main | 1,209 | # frozen_string_literal: true
require "shared_examples/authorize_called"
require "shared_examples/sellers_base_controller_concern"
describe Settings::Profile::ProductsController do
it_behaves_like "inherits from Sellers::BaseController"
let(:seller) { create(:user) }
let(:product) { create(:product, user: sell... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/settings/team/members_controller_spec.rb | Ruby | mit | 8,966 | main | 4,581 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/sellers_base_controller_concern"
require "shared_examples/authorize_called"
describe Settings::Team::MembersController do
it_behaves_like "inherits from Sellers::BaseController"
let(:seller) { create(:named_seller) }
include_context ... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/settings/team/invitations_controller_spec.rb | Ruby | mit | 8,966 | main | 12,917 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/sellers_base_controller_concern"
require "shared_examples/authorize_called"
describe Settings::Team::InvitationsController do
it_behaves_like "inherits from Sellers::BaseController"
let(:seller) { create(:named_seller) }
include_cont... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/stripe/setup_intents_controller_spec.rb | Ruby | mit | 8,966 | main | 4,499 | # frozen_string_literal: true
require "spec_helper"
describe Stripe::SetupIntentsController, :vcr do
describe "POST create" do
context "when card params are invalid" do
it "responds with an error" do
post :create, params: {}
expect(response).to be_unprocessable
expect(response.par... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/gumroad_blog/posts_controller_spec.rb | Ruby | mit | 8,966 | main | 3,941 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/authorize_called"
require "inertia_rails/rspec"
describe GumroadBlog::PostsController, inertia: true do
let(:blog_owner) { create(:user, username: "gumroad") }
describe "GET index" do
let!(:published_post_1) do
create(
... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/workflows/emails_controller_spec.rb | Ruby | mit | 8,966 | main | 4,418 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/authorize_called"
require "shared_examples/sellers_base_controller_concern"
require "inertia_rails/rspec"
describe Workflows::EmailsController, type: :controller, inertia: true do
it_behaves_like "inherits from Sellers::BaseController"
... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/custom_domain/verifications_controller_spec.rb | Ruby | mit | 8,966 | main | 4,359 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/sellers_base_controller_concern"
require "shared_examples/authorize_called"
describe CustomDomain::VerificationsController do
it_behaves_like "inherits from Sellers::BaseController"
describe "POST create" do
let(:seller) { create(:n... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/wishlists/following_controller_spec.rb | Ruby | mit | 8,966 | main | 1,332 | # 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_... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/wishlists/products_controller_spec.rb | Ruby | mit | 8,966 | main | 6,707 | # 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... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/wishlists/followers_controller_spec.rb | Ruby | mit | 8,966 | main | 2,986 | # 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... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/purchases/pings_controller_spec.rb | Ruby | mit | 8,966 | main | 2,159 | # frozen_string_literal: false
require "spec_helper"
require "shared_examples/authorize_called"
require "shared_examples/sellers_base_controller_concern"
describe Purchases::PingsController do
it_behaves_like "inherits from Sellers::BaseController"
render_views
describe "POST create" do
let(:seller) { cre... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/purchases/dispute_evidence_controller_spec.rb | Ruby | mit | 8,966 | main | 6,783 | # frozen_string_literal: false
require "spec_helper"
require "inertia_rails/rspec"
describe Purchases::DisputeEvidenceController, type: :controller, inertia: true do
let(:dispute_evidence) { create(:dispute_evidence) }
let(:purchase) { dispute_evidence.disputable.purchase_for_dispute_evidence }
describe "GET s... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/purchases/variants_controller_spec.rb | Ruby | mit | 8,966 | main | 6,912 | # frozen_string_literal: false
require "spec_helper"
require "shared_examples/authorize_called"
require "shared_examples/sellers_base_controller_concern"
describe Purchases::VariantsController do
it_behaves_like "inherits from Sellers::BaseController"
describe "PUT update" do
let(:seller) { create(:named_sel... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/purchases/invoices_controller_spec.rb | Ruby | mit | 8,966 | main | 32,679 | # frozen_string_literal: true
require "spec_helper"
require "inertia_rails/rspec"
describe Purchases::InvoicesController, :vcr, type: :controller, inertia: true do
context "within consumer area" do
describe "GET new" do
let(:date) { Time.find_zone("UTC").local(2024, 04, 10) }
let(:seller) { create(:... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/purchases/product_controller_spec.rb | Ruby | mit | 8,966 | main | 1,528 | # frozen_string_literal: false
require "spec_helper"
require "inertia_rails/rspec"
describe Purchases::ProductController, type: :controller, inertia: true do
let(:purchase) { create(:purchase) }
let(:product) { purchase.link }
let(:seller) { product.user }
describe "GET show" do
it "renders the Inertia c... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/collaborators/incomings_controller_spec.rb | Ruby | mit | 8,966 | main | 7,950 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/sellers_base_controller_concern"
require "shared_examples/collaborators_base_controller_concern"
require "shared_examples/authentication_required"
require "inertia_rails/rspec"
describe Collaborators::IncomingsController, inertia: true do
... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/collaborators/main_controller_spec.rb | Ruby | mit | 8,966 | main | 9,208 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/sellers_base_controller_concern"
require "shared_examples/collaborators_base_controller_concern"
require "shared_examples/authorize_called"
require "shared_examples/authentication_required"
require "inertia_rails/rspec"
describe Collaborator... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/user/invalidate_active_sessions_controller_spec.rb | Ruby | mit | 8,966 | main | 1,996 | # frozen_string_literal: true
require "spec_helper"
describe User::InvalidateActiveSessionsController do
describe "PUT update" do
let(:user) { create(:user) }
let(:oauth_application) { create(:oauth_application, uid: OauthApplication::MOBILE_API_OAUTH_APPLICATION_UID) }
let!(:active_access_token_one) { ... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/user/passwords_controller_spec.rb | Ruby | mit | 8,966 | main | 6,524 | # frozen_string_literal: true
require "spec_helper"
require "inertia_rails/rspec"
describe User::PasswordsController, type: :controller, inertia: true do
render_views
before do
request.env["devise.mapping"] = Devise.mappings[:user]
@user = create(:user)
end
describe "#new" do
it "renders the Ine... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/user/omniauth_callbacks_controller_spec.rb | Ruby | mit | 8,966 | main | 15,014 | # frozen_string_literal: true
require "spec_helper"
describe User::OmniauthCallbacksController do
ACCOUNT_DELETION_ERROR_MSG = "You cannot log in because your account was permanently deleted. "\
"Please sign up for a new account to start selling!"
before do
request.env["devise.... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/concerns/two_factor_authentication_validator_spec.rb | Ruby | mit | 8,966 | main | 7,533 | # frozen_string_literal: true
require "spec_helper"
describe TwoFactorAuthenticationValidator, type: :controller do
controller(ApplicationController) do
before_action :authenticate_user!
include TwoFactorAuthenticationValidator
def action
head :ok
end
end
before do
routes.draw { get... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/concerns/admin_action_tracker_spec.rb | Ruby | mit | 8,966 | main | 482 | # frozen_string_literal: true
require "spec_helper"
describe AdminActionTracker do
controller do
include AdminActionTracker
def index
head :ok
end
end
before do
routes.draw { get :index, to: "anonymous#index" }
end
it "calling an action increments the call_count" do
record = crea... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/concerns/current_seller_spec.rb | Ruby | mit | 8,966 | main | 2,859 | # frozen_string_literal: true
require "spec_helper"
describe CurrentSeller, type: :controller do
controller(ApplicationController) do
include CurrentSeller
before_action :authenticate_user!
def action
head :ok
end
end
before do
routes.draw { get :action, to: "anonymous#action" }
e... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/concerns/utm_link_tracking_spec.rb | Ruby | mit | 8,966 | main | 13,047 | # frozen_string_literal: true
require "spec_helper"
describe UtmLinkTracking, type: :controller do
controller(ApplicationController) do
include UtmLinkTracking
def action
head :ok
end
end
let(:seller) { create(:user) }
before do
routes.draw { get :action, to: "anonymous#action" }
... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/concerns/helper_widget_spec.rb | Ruby | mit | 8,966 | main | 1,906 | # frozen_string_literal: true
require "spec_helper"
describe HelperWidget, type: :controller do
controller(ApplicationController) do
include HelperWidget
def action
head :ok
end
end
let(:seller) { create(:named_seller, email: "test@example.com") }
let(:user) { create(:user) }
before do
... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/concerns/current_api_user_spec.rb | Ruby | mit | 8,966 | main | 1,669 | # frozen_string_literal: true
require "spec_helper"
describe CurrentApiUser, type: :controller do
controller(ApplicationController) do
include CurrentApiUser
skip_before_action :set_signup_referrer
def action
head :ok
end
end
before do
routes.draw { match :action, to: "anonymous#act... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/concerns/pundit_authorization_spec.rb | Ruby | mit | 8,966 | main | 4,339 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/authorize_called"
describe PunditAuthorization, type: :controller do
class DummyPolicy < ApplicationPolicy
def action?
false
end
end
# Does not inherit from ApplicationPolicy
class PublicDummyPolicy
def initialize(... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/concerns/search_products_spec.rb | Ruby | mit | 8,966 | main | 3,935 | # frozen_string_literal: true
require "spec_helper"
describe SearchProducts do
# Create a test controller that includes the concern
controller(ApplicationController) do
include SearchProducts
def index
format_search_params!
render json: params
end
end
describe "#format_search_params!... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/concerns/custom_domain_route_builder_spec.rb | Ruby | mit | 8,966 | main | 2,623 | # frozen_string_literal: true
require "spec_helper"
describe CustomDomainRouteBuilder, type: :controller do
controller(ApplicationController) do
include CustomDomainRouteBuilder
def action
head :ok
end
end
before do
routes.draw { get :action, to: "anonymous#action" }
end
let!(:custo... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/concerns/validate_recaptcha_spec.rb | Ruby | mit | 8,966 | main | 2,592 | # frozen_string_literal: true
require "spec_helper"
describe ValidateRecaptcha, type: :controller do
controller do
include ValidateRecaptcha
def action
if valid_recaptcha_response?(site_key: "test_site_key")
render json: { success: true }
else
render json: { success: false, erro... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/concerns/csrf_token_injector_spec.rb | Ruby | mit | 8,966 | main | 2,504 | # frozen_string_literal: true
require "spec_helper"
describe CsrfTokenInjector, type: :controller do
controller do
include CsrfTokenInjector
def action
html_body = <<-HTML
<html>
<head>
<meta name="csrf-param" content="authenticity_token">
<meta name="csrf-token" con... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/concerns/impersonate_spec.rb | Ruby | mit | 8,966 | main | 7,250 | # frozen_string_literal: true
require "spec_helper"
describe Impersonate, type: :controller do
controller(ApplicationController) do
include Impersonate
def action
head :ok
end
end
before do
routes.draw { get :action, to: "anonymous#action" }
end
context "when not authenticated" do
... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/concerns/throttling_spec.rb | Ruby | mit | 8,966 | main | 2,005 | # frozen_string_literal: true
require "spec_helper"
describe Throttling, type: :request do
let(:anonymous_controller) do
Class.new(ApplicationController) do
include Throttling
before_action :test_throttle
def test_action
render json: { success: true }
end
private
... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/product_review_videos/streaming_urls_controller_spec.rb | Ruby | mit | 8,966 | main | 2,940 | # 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:) }... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/product_review_videos/upload_contexts_controller_spec.rb | Ruby | mit | 8,966 | main | 708 | # 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... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/product_review_videos/streams_controller_spec.rb | Ruby | mit | 8,966 | main | 1,902 | # 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 ... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/payouts/exports_controller_spec.rb | Ruby | mit | 8,966 | main | 2,445 | # frozen_string_literal: true
require "spec_helper"
RSpec.describe Payouts::ExportsController, type: :controller do
let(:seller) { create(:named_seller) }
before do
sign_in seller
end
describe "POST #create" do
context "when no parameters are provided" do
it "returns unprocessable entity" do
... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/controllers/payouts/exportables_controller_spec.rb | Ruby | mit | 8,966 | main | 4,195 | # frozen_string_literal: true
require "spec_helper"
RSpec.describe Payouts::ExportablesController, type: :controller do
let(:seller) { create(:named_seller) }
before do
sign_in seller
end
describe "GET #index" do
context "when the seller has payouts" do
let!(:payouts_2021) { create_list(:payme... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.