Replace hyphen with underscore in Mastodon address
Unfortunately, Mastodon only allows underscores for usernames, and reversely, akkounts only allows hyphens and no underscores.
This commit is contained in:
@@ -41,6 +41,14 @@ RSpec.describe User, type: :model do
|
||||
expect(user.mastodon_address).to eq("jimmy@kosmos.social")
|
||||
end
|
||||
end
|
||||
|
||||
describe "username contains hyphen/dash" do
|
||||
let(:jammy) { build :user, cn: "jammy-jellyfish", ou: "kosmos.org" }
|
||||
|
||||
it "returns the user address" do
|
||||
expect(jammy.mastodon_address).to eq("jammy_jellyfish@kosmos.org")
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user