Sha256: 814d7786ca969c8c6e8d73582a0ffec3269fbe4413fc9ee207b10bfdc136b3a4
Contents?: true
Size: 637 Bytes
Versions: 1
Compression:
Stored size: 637 Bytes
Contents
require 'test_helper.rb' class SongUpdateTest < MiniTest::Spec let(:song) do Song::Create.( { title: 'Song Title' }, "current_user" => 'user_name' ) end let(:result) do Song::Update.( params: { id: song['model'].id, title: 'New Song Title' }, current_user: current_user ) end describe 'when user cannot update song' do let(:current_user) { 'wrong'} it { result.failure? } end describe 'when user cannot update song' do let(:current_user) { 'user_name'} it { result.failure? } it { result[:model].title == 'New Song Title' } end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
trailblazer-future-2.1.0.rc1 | test/rails5.0/test/concepts/song/operation/update_test.rb |