Sha256: dec29deb11f78909bc4cc18a38297ccc5d81999224106454952b7f0975f1ab49
Contents?: true
Size: 624 Bytes
Versions: 11
Compression:
Stored size: 624 Bytes
Contents
require 'spec_helper' describe LoldesignPublisher::ActivablesController, type: :controller do describe '#create' do let!(:user){ create(:user) } before{ post(:create, resource_name: 'User', id: user.id) } it{expect(user.reload.active).to be true} it{expect(response.body).to eq("{\"message\":\"User - 1 activated.\"}")} end describe '#destroy' do let!(:user){ create(:user, :actived) } before{ delete(:destroy, resource_name: 'User', id: user.id) } it{expect(user.reload.active).to be false} it{expect(response.body).to eq("{\"message\":\"User - 1 inactivated.\"}")} end end
Version data entries
11 entries across 11 versions & 1 rubygems