diff options
-rw-r--r-- | docs/Running-Mastodon/Production-guide.md | 2 | ||||
-rw-r--r-- | spec/models/status_spec.rb | 14 |
2 files changed, 13 insertions, 3 deletions
diff --git a/docs/Running-Mastodon/Production-guide.md b/docs/Running-Mastodon/Production-guide.md index 90e9c0dea..1a65771ce 100644 --- a/docs/Running-Mastodon/Production-guide.md +++ b/docs/Running-Mastodon/Production-guide.md @@ -90,7 +90,7 @@ It is recommended to create a special user for mastodon on the server (you could sudo apt-get install imagemagick ffmpeg libpq-dev libxml2-dev libxslt1-dev nodejs file git curl curl -sL https://deb.nodesource.com/setup_4.x | sudo bash - - apt-get intall nodejs + apt-get install nodejs sudo npm install -g yarn ## Redis diff --git a/spec/models/status_spec.rb b/spec/models/status_spec.rb index db244ebe7..000bee0f5 100644 --- a/spec/models/status_spec.rb +++ b/spec/models/status_spec.rb @@ -91,11 +91,21 @@ RSpec.describe Status, type: :model do end describe '#reblogs_count' do - pending + it 'is the number of reblogs' do + Fabricate(:status, account: bob, reblog: subject) + Fabricate(:status, account: alice, reblog: subject) + + expect(subject.reblogs_count).to eq 2 + end end describe '#favourites_count' do - pending + it 'is the number of favorites' do + Fabricate(:favourite, account: bob, status: subject) + Fabricate(:favourite, account: alice, status: subject) + + expect(subject.favourites_count).to eq 2 + end end describe '#proper' do |