Sha256: c4dcfcd735b1c39ad15b41c268fc37ca05f0398f72788145e4ca98527b5a6ab1
Contents?: true
Size: 1.15 KB
Versions: 1
Compression:
Stored size: 1.15 KB
Contents
describe ::PPC::Baidu::Account do subject{::PPC::Baidu::Account.new( debug:true, username:$baidu_username, password:$baidu_password, token:$baidu_token )} it "prints all info" do expect(subject.info.keys).to eq ["userid", "balance", "cost", "payment", "budgetType", "budget", "regionTarget", "excludeIp", "openDomains", "regDomain", "budgetOfflineTime", "weeklyBudget", "userStat", "isDynamicCreative", "dynamicCreativeParam", "opt"] end it "prints all updated info" do info = { budget_type: 1, budget: 3000 } response = subject.update( info ) expect(response.keys).to eq ["userid", "balance", "cost", "payment", "budgetType", "budget", "regionTarget", "excludeIp", "openDomains", "regDomain", "budgetOfflineTime", "weeklyBudget", "userStat", "isDynamicCreative", "dynamicCreativeParam", "opt"] expect(response["budgetType"]).to eq 1 expect(response["budget"]).to eq 3000 end # it "could download all plan" do # result = subject.all # if result # expect(result.keys).to include :account_file_path # else # expect(subject.code).to eq '901162' # end # end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ppc-1.3.0 | spec/baidu_account_spec.rb |