action_spec.rb revision 3da1771ccd411609156bf2721537c6a8e41050d4
57da8c32f85c0255efa61ee32e260068afdaa565KATOH Yasufumirequire 'spec_helper'
57da8c32f85c0255efa61ee32e260068afdaa565KATOH Yasufumi let(:target) { action.created_at + action.eta }
57da8c32f85c0255efa61ee32e260068afdaa565KATOH Yasufumi it 'should return the initial eta at creation time' do
57da8c32f85c0255efa61ee32e260068afdaa565KATOH Yasufumi it 'should return 0 if the eta has been reached' do
57da8c32f85c0255efa61ee32e260068afdaa565KATOH Yasufumi expect(action.eta(target + 5.minutes)).to eq(0)
a5ba96715d4ef264c43d4f187251de491ba198c0KATOH Yasufumi let(:action) { create :action, resource: resource }
57da8c32f85c0255efa61ee32e260068afdaa565KATOH Yasufumi let(:resource) { mock_model("Resource", state: status) }
57da8c32f85c0255efa61ee32e260068afdaa565KATOH Yasufumi let(:resource) { mock_model("Resource", status: status) }