Commit 6b30b859 by lang1pal

#26 add rspec

parent 758ef3af
...@@ -15,4 +15,10 @@ describe WeixinAuthorize::Api::Qrcode do ...@@ -15,4 +15,10 @@ describe WeixinAuthorize::Api::Qrcode do
expect(response.result.keys).to eq(["ticket"]) expect(response.result.keys).to eq(["ticket"])
end end
it "#return_qr_url" do
response = $client.create_qr_limit_scene("1234")
qr_url = $client.qr_code_url(response.result["ticket"])
expect(response.code).to eq(WeixinAuthorize::OK_CODE)
expect(qr_url).to include("mp.weixin.qq.com")
end
end end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment