1
0
Fork 0
mirror of https://github.com/mastodon/mastodon.git synced 2024-08-20 21:08:15 -07:00

Compare commits

...

3 commits

Author SHA1 Message Date
Matt Jankowski
33eb1aa69f
Merge 59f05d1904 into 549ab089ee 2024-07-31 11:08:53 +00:00
Matt Jankowski
59f05d1904 Remove attr reader dec 2024-07-29 09:46:21 -04:00
Matt Jankowski
1b23091ac7 Remove single-use ProfileStories method 2024-07-29 09:42:32 -04:00
2 changed files with 3 additions and 15 deletions

View file

@ -1,7 +1,7 @@
# frozen_string_literal: true # frozen_string_literal: true
module ProfileStories module ProfileStories
attr_reader :bob, :alice, :alice_bio attr_reader :bob
def fill_in_auth_details(email, password) def fill_in_auth_details(email, password)
fill_in 'user_email', with: email fill_in 'user_email', with: email
@ -31,18 +31,6 @@ module ProfileStories
bob.update!(role: UserRole.find_by!(name: 'Admin')) bob.update!(role: UserRole.find_by!(name: 'Admin'))
end end
def with_alice_as_local_user
@alice_bio = '@alice and @bob are fictional characters commonly used as' \
'placeholder names in #cryptology, as well as #science and' \
'engineering 📖 literature. Not affiliated with @pepe.'
@alice = Fabricate(
:user,
email: 'alice@example.com', password: password, confirmed_at: confirmed_at,
account: Fabricate(:account, username: 'alice', note: @alice_bio)
)
end
def confirmed_at def confirmed_at
@confirmed_at ||= Time.zone.now @confirmed_at ||= Time.zone.now
end end

View file

@ -11,10 +11,10 @@ describe 'Profile' do
before do before do
as_a_logged_in_user as_a_logged_in_user
with_alice_as_local_user Fabricate(:user, account: Fabricate(:account, username: 'alice'))
end end
it 'I can view Annes public account' do it 'I can view public account page for Alice' do
visit account_path('alice') visit account_path('alice')
expect(subject).to have_title("alice (@alice@#{local_domain})") expect(subject).to have_title("alice (@alice@#{local_domain})")