Commit 7cae0363 by lanrion

fixed weixin SB system error message

parent cc681b1c
......@@ -11,8 +11,13 @@ describe WeixinAuthorize::Api::Groups do
it "create a group" do
response = $client.create_group(group_name)
if !response["errcode"].nil?
expect(response.keys).to eq(["errcode", "errmsg"])
puts "SB WEIXIN says: system error"
else
expect(response["group"]["name"]).to eq(group_name)
end
end
it "get groups" do
groups = $client.groups
......@@ -26,12 +31,17 @@ describe WeixinAuthorize::Api::Groups do
it "#update_group_name" do
response = $client.create_group(group_name)
if !response["errcode"].nil?
expect(response.keys).to eq(["errcode", "errmsg"])
puts "SB WEIXIN says: system error"
else
expect(response["group"]["name"]).to eq(group_name)
response = $client.update_group_name(response["group"]["id"], group_name_2)
expect(response["errcode"]).to eq(0)
groups = $client.groups
expect(groups["groups"][-1]["name"]).to eq(group_name_2)
end
end
it "#update_group_for_openid" do
groups = $client.groups
......
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