<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>mofmof-inc</author_name>
  <author_url>https://blog.hatena.ne.jp/mofmof-inc/</author_url>
  <blog_title>もふもふ技術部</blog_title>
  <blog_url>https://www.mof-mof.co.jp/tech-blog/</blog_url>
  <categories>
    <anon>Payjp</anon>
    <anon>Rails</anon>
  </categories>
  <description>前回の記事ではPayjpを使った定期購入の実装について解説した。そこで今回は、Payjpを使った実装のテストについて書いてみたいと思う。 Payjpは外部APIなので、API呼び出し部分のモックを作ってテストを記述した方が良い。 対象となるアプリ 2つ前の記事で作成した単発購入機能のテストを書いていきたいと思う。（決して定期実装の方がめんどくさいからではない！！！………多分） アプリの仕様 もう一度思い出してみる。まずフロントはチェックアウトを置くだけなので、テストの対象外。 &lt;%# app/views/charges/new.html.erb %&gt; &lt;script type=&quot;text/ja…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fwww.mof-mof.co.jp%2Ftech-blog%2Fpayjp-spec&quot; title=&quot;Payjpを導入したアプリのテストを書いていく - もふもふ技術部&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2021-02-05 00:00:00</published>
  <title>Payjpを導入したアプリのテストを書いていく</title>
  <type>rich</type>
  <url>https://www.mof-mof.co.jp/tech-blog/payjp-spec</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
