Sha256: e5a94064a0615c5b438fd8ae33abca2e2434cab7c7d3b341f98015a2d46aeb8f
Contents?: true
Size: 1.17 KB
Versions: 7
Compression:
Stored size: 1.17 KB
Contents
describe ::PPC::API::Qihu::Sublink do auth = $qihu_auth test_plan_id = ::PPC::API::Qihu::Plan::ids( auth )[:result][0].to_i test_group_id = ::PPC::API::Qihu::Group::search_id_by_plan_id( auth, test_plan_id )[:result][0][:group_ids][0].to_i test_sublink_id = 0 it 'can add a sublink' do sublink1 = { group_id:test_group_id, anchor: "shushide", url: 'http://hotel.elong.com' } response = ::PPC::API::Qihu::Sublink::add( auth, sublink1) is_success( response ) test_sublink_id = response[:result][0][:id] end it 'can update a sublink' do sublink = { id: test_sublink_id, anchor: 'testaaaaa' } response = ::PPC::API::Qihu::Sublink::update( auth, sublink ) is_success( response ) end it 'can get sublinks' do response = ::PPC::API::Qihu::Sublink::get( auth, test_sublink_id ) is_success( response ) expect( response[:result][0].keys ).to include( :id, :anchor ) end it 'can delete a sublink' do response = ::PPC::API::Qihu::Sublink::delete( auth, test_sublink_id ) is_success( response ) end end
Version data entries
7 entries across 7 versions & 1 rubygems