Revert "Update rails."

This reverts commit 898ec43989.
This commit is contained in:
Robin Ward 2016-07-15 16:35:57 -04:00
parent 56a7249498
commit 4d27d7e1d3
2 changed files with 40 additions and 40 deletions

View file

@ -1,38 +1,38 @@
GEM
remote: https://rubygems.org/
specs:
actionmailer (4.2.7)
actionpack (= 4.2.7)
actionview (= 4.2.7)
activejob (= 4.2.7)
actionmailer (4.2.6)
actionpack (= 4.2.6)
actionview (= 4.2.6)
activejob (= 4.2.6)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 1.0, >= 1.0.5)
actionpack (4.2.7)
actionview (= 4.2.7)
activesupport (= 4.2.7)
actionpack (4.2.6)
actionview (= 4.2.6)
activesupport (= 4.2.6)
rack (~> 1.6)
rack-test (~> 0.6.2)
rails-dom-testing (~> 1.0, >= 1.0.5)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (4.2.7)
activesupport (= 4.2.7)
actionview (4.2.6)
activesupport (= 4.2.6)
builder (~> 3.1)
erubis (~> 2.7.0)
rails-dom-testing (~> 1.0, >= 1.0.5)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
active_model_serializers (0.8.3)
activemodel (>= 3.0)
activejob (4.2.7)
activesupport (= 4.2.7)
activejob (4.2.6)
activesupport (= 4.2.6)
globalid (>= 0.3.0)
activemodel (4.2.7)
activesupport (= 4.2.7)
activemodel (4.2.6)
activesupport (= 4.2.6)
builder (~> 3.1)
activerecord (4.2.7)
activemodel (= 4.2.7)
activesupport (= 4.2.7)
activerecord (4.2.6)
activemodel (= 4.2.6)
activesupport (= 4.2.6)
arel (~> 6.0)
activesupport (4.2.7)
activesupport (4.2.6)
i18n (~> 0.7)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
@ -160,7 +160,7 @@ GEM
rack (>= 1.1.3)
metaclass (0.0.4)
method_source (0.8.2)
mime-types (2.99.2)
mime-types (2.99.1)
mini_portile2 (2.1.0)
mini_racer (0.1.3)
libv8 (~> 5.0)
@ -248,16 +248,16 @@ GEM
rack
rack-test (0.6.3)
rack (>= 1.0)
rails (4.2.7)
actionmailer (= 4.2.7)
actionpack (= 4.2.7)
actionview (= 4.2.7)
activejob (= 4.2.7)
activemodel (= 4.2.7)
activerecord (= 4.2.7)
activesupport (= 4.2.7)
rails (4.2.6)
actionmailer (= 4.2.6)
actionpack (= 4.2.6)
actionview (= 4.2.6)
activejob (= 4.2.6)
activemodel (= 4.2.6)
activerecord (= 4.2.6)
activesupport (= 4.2.6)
bundler (>= 1.3.0, < 2.0)
railties (= 4.2.7)
railties (= 4.2.6)
sprockets-rails
rails-deprecated_sanitizer (1.0.3)
activesupport (>= 4.2.0.alpha)
@ -270,13 +270,13 @@ GEM
rails-observers (0.1.2)
activemodel (~> 4.0)
rails_multisite (1.0.4)
railties (4.2.7)
actionpack (= 4.2.7)
activesupport (= 4.2.7)
railties (4.2.6)
actionpack (= 4.2.6)
activesupport (= 4.2.6)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
raindrops (0.16.0)
rake (11.2.2)
rake (11.1.2)
rake-compiler (0.9.9)
rake
rb-fsevent (0.9.7)
@ -369,10 +369,10 @@ GEM
spork-rails (4.0.0)
rails (>= 3.0.0, < 5)
spork (>= 1.0rc0)
sprockets (3.6.3)
sprockets (3.6.0)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (3.1.1)
sprockets-rails (3.0.4)
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)

View file

@ -82,7 +82,7 @@ describe PostAlerter do
post.revise(admin, {raw: 'I made another revision'})
end
expect(Notification.where(post_number: 1, topic_id: post.topic_id).count).to eq(3)
expect(Notification.count(post_number: 1, topic_id: post.topic_id)).to eq(3)
end
end
@ -97,7 +97,7 @@ describe PostAlerter do
PostAction.remove_act(evil_trout, post, PostActionType.types[:like])
PostAction.act(evil_trout, post, PostActionType.types[:like])
expect(Notification.where(post_number: 1, topic_id: post.topic_id).count).to eq(1)
expect(Notification.count(post_number: 1, topic_id: post.topic_id)).to eq(1)
end
it 'notifies on does not notify when never is selected' do
@ -111,7 +111,7 @@ describe PostAlerter do
PostAction.act(evil_trout, post, PostActionType.types[:like])
expect(Notification.where(post_number: 1, topic_id: post.topic_id).count).to eq(0)
expect(Notification.count(post_number: 1, topic_id: post.topic_id)).to eq(0)
end
it 'notifies on likes correctly' do
@ -124,7 +124,7 @@ describe PostAlerter do
PostAction.act(admin, post, PostActionType.types[:like])
# one like
expect(Notification.where(post_number: 1, topic_id: post.topic_id).count).to eq(1)
expect(Notification.count(post_number: 1, topic_id: post.topic_id)).to eq(1)
post.user.user_option.update_columns(like_notification_frequency:
@ -132,7 +132,7 @@ describe PostAlerter do
admin2 = Fabricate(:admin)
PostAction.act(admin2, post, PostActionType.types[:like])
expect(Notification.where(post_number: 1, topic_id: post.topic_id).count).to eq(1)
expect(Notification.count(post_number: 1, topic_id: post.topic_id)).to eq(1)
# adds info to the notification
notification = Notification.find_by(post_number: 1,
@ -146,7 +146,7 @@ describe PostAlerter do
PostAction.remove_act(evil_trout, post, PostActionType.types[:like])
# rebuilds the missing notification
expect(Notification.where(post_number: 1, topic_id: post.topic_id).count).to eq(1)
expect(Notification.count(post_number: 1, topic_id: post.topic_id)).to eq(1)
notification = Notification.find_by(post_number: 1,
topic_id: post.topic_id)
@ -168,7 +168,7 @@ describe PostAlerter do
end
# first happend within the same day, no need to notify
expect(Notification.where(post_number: 1, topic_id: post.topic_id).count).to eq(2)
expect(Notification.count(post_number: 1, topic_id: post.topic_id)).to eq(2)
end
end