mirror of
https://github.com/Retrospring/retrospring.git
synced 2025-03-31 03:32:13 +02:00
catchup on master
This commit is contained in:
commit
7541c54944
7 changed files with 20 additions and 22 deletions
|
@ -3,5 +3,4 @@ rvm: 2.1
|
||||||
before_script:
|
before_script:
|
||||||
- cp config/database.yml.postgres config/database.yml
|
- cp config/database.yml.postgres config/database.yml
|
||||||
- cp config/justask.yml.example config/justask.yml
|
- cp config/justask.yml.example config/justask.yml
|
||||||
- bundle exec rake db:setup
|
- bundle exec rake db:drop db:create db:migrate db:test:prepare
|
||||||
- bundle exec rake db:migrate
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# Retrospring [](https://travis-ci.org/Retrospring/retrospring)
|
# Retrospring [](https://snap-ci.com/Retrospring/retrospring/branch/master)
|
||||||
|
|
||||||
This is the source code that powers Retrospring. Yep, all of it. Including
|
This is the source code that powers Retrospring. Yep, all of it. Including
|
||||||
all the branches where we left off.
|
all the branches where we left off.
|
||||||
|
|
|
@ -23,5 +23,12 @@ module Justask
|
||||||
|
|
||||||
# Use Sidekiq for background jobs
|
# Use Sidekiq for background jobs
|
||||||
config.active_job.queue_adapter = :sidekiq
|
config.active_job.queue_adapter = :sidekiq
|
||||||
|
|
||||||
|
# DEPRECATION WARNING: Currently, Active Record suppresses errors raised
|
||||||
|
# within `after_rollback`/`after_commit` callbacks and only print them to the logs.
|
||||||
|
# In the next version, these errors will no longer be suppressed.
|
||||||
|
# Instead, the errors will propagate normally just like in other Active Record callbacks.
|
||||||
|
# fix for this warning:
|
||||||
|
config.active_record.raise_in_transactional_callbacks = true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -22,22 +22,24 @@ feature "Ban users", :devise do
|
||||||
login_as me, scope: :user
|
login_as me, scope: :user
|
||||||
visit root_path
|
visit root_path
|
||||||
expect(page).to have_text("Timeline")
|
expect(page).to have_text("Timeline")
|
||||||
page.driver.render Rails.root.join("tmp/#{Time.now.to_i}_1.png"), full: true
|
page.driver.render Rails.root.join("tmp/ban_#{Time.now.to_i}_1.png"), full: true
|
||||||
|
|
||||||
me.banned = true
|
me.permanently_banned = true
|
||||||
me.save
|
me.save
|
||||||
click_link "Inbox"
|
|
||||||
|
visit "/inbox"
|
||||||
|
|
||||||
expect(current_path).to eq(new_user_session_path)
|
expect(current_path).to eq(new_user_session_path)
|
||||||
page.driver.render Rails.root.join("tmp/#{Time.now.to_i}_2.png"), full: true
|
page.driver.render Rails.root.join("tmp/ban_#{Time.now.to_i}_2.png"), full: true
|
||||||
end
|
end
|
||||||
|
|
||||||
scenario 'user visits banned user profiles', js: true do
|
scenario 'user visits banned user profiles', js: true do
|
||||||
evil_user = FactoryGirl.create :user
|
evil_user = FactoryGirl.create :user
|
||||||
evil_user.banned = true
|
evil_user.permanently_banned = true
|
||||||
evil_user.save
|
evil_user.save
|
||||||
|
|
||||||
visit show_user_profile_path(evil_user.screen_name)
|
visit show_user_profile_path(evil_user.screen_name)
|
||||||
expect(page).to have_text('Banned'.upcase)
|
expect(page).to have_text('BANNED')
|
||||||
page.driver.render Rails.root.join("tmp/#{Time.now.to_i}_3.png"), full: true
|
page.driver.render Rails.root.join("tmp/ban_#{Time.now.to_i}_3.png"), full: true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -56,7 +56,7 @@ feature "Inbox", :devise do
|
||||||
|
|
||||||
click_button "Get new question"
|
click_button "Get new question"
|
||||||
wait_for_ajax
|
wait_for_ajax
|
||||||
expect(page).to have_text('Answer'.upcase)
|
expect(page).to have_text('Answer')
|
||||||
page.driver.render Rails.root.join("tmp/#{Time.now.to_i}_2.png"), full: true
|
page.driver.render Rails.root.join("tmp/#{Time.now.to_i}_2.png"), full: true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -77,7 +77,7 @@ feature "Inbox", :devise do
|
||||||
|
|
||||||
click_button "Get new question"
|
click_button "Get new question"
|
||||||
wait_for_ajax
|
wait_for_ajax
|
||||||
expect(page).to have_text('Answer'.upcase)
|
expect(page).to have_text('Answer')
|
||||||
page.driver.render Rails.root.join("tmp/#{Time.now.to_i}_2.png"), full: true
|
page.driver.render Rails.root.join("tmp/#{Time.now.to_i}_2.png"), full: true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
require 'rails_helper'
|
|
||||||
|
|
||||||
RSpec.describe CommentSmile, :type => :model do
|
|
||||||
pending "add some examples to (or delete) #{__FILE__}"
|
|
||||||
end
|
|
|
@ -1,5 +0,0 @@
|
||||||
require 'rails_helper'
|
|
||||||
|
|
||||||
RSpec.describe Subscription, :type => :model do
|
|
||||||
pending "add some examples to (or delete) #{__FILE__}"
|
|
||||||
end
|
|
Loading…
Reference in a new issue