Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/diaspora/diaspora.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/models/user_spec.rb')
-rw-r--r--spec/models/user_spec.rb11
1 files changed, 3 insertions, 8 deletions
diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb
index 560432927..6a41d3472 100644
--- a/spec/models/user_spec.rb
+++ b/spec/models/user_spec.rb
@@ -267,11 +267,6 @@ describe User, :type => :model do
expect(alice).not_to be_valid
end
- it 'should not contain periods' do
- alice.username = "kittens."
- expect(alice).not_to be_valid
- end
-
it "can be 32 characters long" do
alice.username = "hexagoooooooooooooooooooooooooon"
expect(alice).to be_valid
@@ -816,10 +811,10 @@ describe User, :type => :model do
context "with autofollow sharing enabled" do
it "should start sharing with autofollow account" do
AppConfig.settings.autofollow_on_join = true
- AppConfig.settings.autofollow_on_join_user = "one"
-
- expect(Person).to receive(:find_or_fetch_by_identifier).with("one")
+ person = FactoryGirl.build(:person)
+ AppConfig.settings.autofollow_on_join_user = person.diaspora_handle
+ expect(Person).to receive(:find_or_fetch_by_identifier).with(person.diaspora_handle).and_return(person)
user.seed_aspects
end
end