@ -14,7 +14,7 @@ RSpec.describe UnsuspendAccountService, type: :service do
local_follower . follow! ( account )
local_follower . follow! ( account )
list . accounts << account
list . accounts << account
account . suspend!( origin : :local )
account . un suspend!
end
end
end
end
@ -30,8 +30,8 @@ RSpec.describe UnsuspendAccountService, type: :service do
stub_request ( :post , 'https://bob.com/inbox' ) . to_return ( status : 201 )
stub_request ( :post , 'https://bob.com/inbox' ) . to_return ( status : 201 )
end
end
it ' marks account as unsuspended ' do
it ' does not change the “suspended” flag ' do
expect { subject } . to change { account . suspended? } . from ( true ) . to ( false )
expect { subject } . to _not change { account . suspended? }
end
end
include_examples 'common behavior' do
include_examples 'common behavior' do
@ -83,8 +83,8 @@ RSpec.describe UnsuspendAccountService, type: :service do
expect ( FeedManager . instance ) . to have_received ( :merge_into_list ) . with ( account , list )
expect ( FeedManager . instance ) . to have_received ( :merge_into_list ) . with ( account , list )
end
end
it ' marks account as unsuspended ' do
it ' does not change the “suspended” flag ' do
expect { subject } . to change { account . suspended? } . from ( true ) . to ( false )
expect { subject } . to _not change { account . suspended? }
end
end
end
end
@ -107,8 +107,8 @@ RSpec.describe UnsuspendAccountService, type: :service do
expect ( FeedManager . instance ) . to_not have_received ( :merge_into_list ) . with ( account , list )
expect ( FeedManager . instance ) . to_not have_received ( :merge_into_list ) . with ( account , list )
end
end
it ' does not mark the account as un suspended' do
it ' marks account as suspended' do
expect { subject } . not_ to change { account . suspended? }
expect { subject } . to change { account . suspended? } . from ( false ) . to ( true )
end
end
end
end