otwarchive-symphonyarchive/spec/models/challenge_claim_spec.rb

15 lines
463 B
Ruby
Raw Normal View History

2026-03-11 22:22:11 +00:00
require 'spec_helper'
describe ChallengeClaim do
describe '#claim_byline' do
it "should return the claiming user's default pseud byline" do
user = create(:user)
claim = ChallengeClaim.new(claiming_user_id: user.id)
expect(claim.claim_byline).to eq(user.default_pseud.byline)
end
it "should tell you when there's no user instead of erroring" do
expect(ChallengeClaim.new.claim_byline).to eq("deleted user")
end
end
end