Skip to content
Snippets Groups Projects
Commit 02a0fd5b authored by Akihiko Odaki (@fn_aki@pawoo.net)'s avatar Akihiko Odaki (@fn_aki@pawoo.net) Committed by Eugen Rochko
Browse files

Spec InlineRablScope (#3542)

parent 6505a42b
No related branches found
No related tags found
No related merge requests found
# frozen_string_literal: true
require 'rails_helper'
describe InlineRablScope do
describe '#current_account' do
it 'returns the given account' do
account = Fabricate(:account)
expect(InlineRablScope.new(account).current_account).to eq account
end
end
describe '#current_user' do
it 'returns nil if the given account is nil' do
expect(InlineRablScope.new(nil).current_user).to eq nil
end
it 'returns user of account if the given account is not nil' do
user = Fabricate(:user)
expect(InlineRablScope.new(user.account).current_user).to eq user
end
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment