Lines Matching refs:action
5 let(:action) { create :action }
6 let(:target) { action.action_started_at + action.eta }
9 expect(action.eta(action.created_at).to_i).
10 to eq(action.initial_eta)
14 expect(action.eta(target - 1).to_i).to eq(1)
18 expect(action.eta(target + 5.minutes)).to eq(0)
21 it 'should return initial eta when action has been started' do
22 action.register_start_of_action
23 expect(action.eta(action.action_started_at).to_i).
24 to eq(action.initial_eta)
27 it 'should return correct eta when action has been started' do
28 action.register_start_of_action
29 expect(action.eta(target - 2).to_i).to eq(2)
34 let(:action) { create :action, resource: resource }
41 expect(action.status).to eq(status)
49 expect(action.status).to eq(status)
57 expect { action.status }.to raise_error(NoMethodError)
66 expect(action.status).to eq(status)