Sha256: caf54e56209d879456c8ed0e8c36ab5307f8968f6c91f6d741ce094aa52d5a44
Contents?: true
Size: 1.03 KB
Versions: 13
Compression:
Stored size: 1.03 KB
Contents
# frozen_string_literal: true require ::File.expand_path("../test_helper", __dir__) module Stripe class LoginLinkTest < Test::Unit::TestCase setup do account_fixture = { "id" => "acct_123", "object" => "account", "login_links" => { "data" => [], "has_more" => false, "object" => "list", "url" => "/v1/accounts/acct_123/login_links", }, } @account = Stripe::Account.construct_from(account_fixture) end should "not be retrievable" do assert_raises NotImplementedError do Stripe::LoginLink.retrieve("foo") end end should "be creatable" do stub_request(:post, "#{Stripe.api_base}/v1/accounts/#{@account.id}/login_links") .to_return(body: JSON.generate(object: "login_link")) login_link = @account.login_links.create assert_requested :post, "#{Stripe.api_base}/v1/accounts/#{@account.id}/login_links" assert login_link.is_a?(Stripe::LoginLink) end end end
Version data entries
13 entries across 13 versions & 2 rubygems