Sha256: 5e953fd3db27bb92b440d0e6f346aa9beb2a852b64b44ecc9f3793e2b76d3c25
Contents?: true
Size: 942 Bytes
Versions: 5
Compression:
Stored size: 942 Bytes
Contents
require 'spec_helper' require 'td/command/common' require 'td/config' require 'td/command/list' require 'td/command/sched' require 'td/client/model' require 'time' module TreasureData::Command describe 'sched_history' do it 'runs' do client = Object.new time = Time.now.xmlschema job_params = ['job_id', :type, 'query', 'status', nil, nil, time, time, 123, 456] job1 = TreasureData::ScheduledJob.new(client, '2015-02-17 13:22:52 +0900', *job_params) job2 = TreasureData::ScheduledJob.new(client, nil, *job_params) client.stub(:schedules).and_return([]) client.stub(:history).and_return([job1, job2]) command = Class.new { include TreasureData::Command }.new command.stub(:get_client).and_return(client) op = List::CommandParser.new('sched:history', %w[], %w[], false, [], []) expect { command.sched_history(op) }.to_not raise_exception end end end
Version data entries
5 entries across 5 versions & 1 rubygems