Sha256: 57c704edb71f06426e0f92aab8a3015caf747f33390da5223321d689c1b8db45
Contents?: true
Size: 910 Bytes
Versions: 6
Compression:
Stored size: 910 Bytes
Contents
require_relative '../spec_helper' describe Commands::Activity::Destroy do is_required :id, :application_id let(:response) { subject.class.run(params) } let(:params) { {} } before do @activity = ActivityFactory.create({ application_id: 100, title: 'test activity' }) end context 'with valid params' do let(:params) { { id: @activity[:id], application_id: @activity[:application_id] } } it 'deletes the activity' do response.success?.should == true response.result.should == {} Commands::Activity::Get.run(params).status.should == :not_found end end context 'with invalid :id' do let(:params) { { id: 142857, application_id: @activity[:application_id] }} it 'is unsuccessful' do response.success?.should == false response.result.should == {} response.status.should == :not_found end end end
Version data entries
6 entries across 6 versions & 1 rubygems