Commit 7cae0363 by lanrion

fixed weixin SB system error message

parent cc681b1c
......@@ -11,7 +11,12 @@ describe WeixinAuthorize::Api::Groups do
it "create a group" do
response = $client.create_group(group_name)
expect(response["group"]["name"]).to eq(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
......@@ -26,11 +31,16 @@ describe WeixinAuthorize::Api::Groups do
it "#update_group_name" do
response = $client.create_group(group_name)
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)
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
......
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