remove trailing whitespaces ❤️

This commit is contained in:
Gosha Arinich
2013-02-25 19:42:20 +03:00
parent b50e0536c7
commit cafc75b238
383 changed files with 4220 additions and 2221 deletions

View File

@ -9,7 +9,7 @@ describe Admin::EmailLogsController do
let!(:user) { log_in(:admin) }
context '.index' do
before do
before do
xhr :get, :index
end
@ -26,7 +26,7 @@ describe Admin::EmailLogsController do
context 'with an email address' do
it 'enqueues a test email job' do
Jobs.expects(:enqueue).with(:test_email, to_address: 'eviltrout@test.domain')
Jobs.expects(:enqueue).with(:test_email, to_address: 'eviltrout@test.domain')
xhr :post, :test, email_address: 'eviltrout@test.domain'
end
@ -34,4 +34,4 @@ describe Admin::EmailLogsController do
end
end
end

View File

@ -4,7 +4,7 @@ describe Admin::ExportController do
it "is a subclass of AdminController" do
(Admin::ExportController < Admin::AdminController).should be_true
end
context 'while logged in as an admin' do
before do
@user = log_in(:admin)
@ -54,4 +54,4 @@ describe Admin::ExportController do
end
end
end
end
end

View File

@ -23,10 +23,10 @@ describe Admin::FlagsController do
it 'returns a valid json payload when some thing is flagged' do
p = Fabricate(:post)
u = Fabricate(:user)
PostAction.act(u, p, PostActionType.Types[:spam])
xhr :get, :index
data = ::JSON.parse(response.body)
data["users"].length == 2
data["posts"].length == 1
@ -34,4 +34,4 @@ describe Admin::FlagsController do
end
end
end

View File

@ -50,12 +50,12 @@ describe Admin::ImpersonateController do
it "also works with an email address" do
xhr :post, :create, username_or_email: user.email
session[:current_user_id].should == user.id
end
end
it "also works with a name" do
xhr :post, :create, username_or_email: user.name
session[:current_user_id].should == user.id
end
end
end

View File

@ -20,16 +20,16 @@ describe Admin::SiteCustomizationsController do
it 'returns JSON' do
xhr :get, :index
::JSON.parse(response.body).should be_present
end
end
end
context ' .create' do
it 'returns success' do
it 'returns success' do
xhr :post, :create, site_customization: {name: 'my test name'}
response.should be_success
end
it 'returns json' do
it 'returns json' do
xhr :post, :create, site_customization: {name: 'my test name'}
::JSON.parse(response.body).should be_present
end

View File

@ -20,7 +20,7 @@ describe Admin::SiteSettingsController do
it 'returns JSON' do
xhr :get, :index
::JSON.parse(response.body).should be_present
end
end
end
context 'update' do
@ -40,4 +40,4 @@ describe Admin::SiteSettingsController do
end
end

View File

@ -20,7 +20,7 @@ describe Admin::UsersController do
it 'returns JSON' do
xhr :get, :index
::JSON.parse(response.body).should be_present
end
end
end
context '.show' do
@ -81,7 +81,7 @@ describe Admin::UsersController do
response.should be_forbidden
end
it 'updates the admin flag' do
it 'updates the admin flag' do
xhr :put, :revoke_admin, user_id: @another_admin.id
@another_admin.reload
@another_admin.should_not be_admin
@ -99,12 +99,12 @@ describe Admin::UsersController do
response.should be_forbidden
end
it "returns a 404 if the username doesn't exist" do
it "returns a 404 if the username doesn't exist" do
xhr :put, :grant_admin, user_id: 123123
response.should be_forbidden
end
it 'updates the admin flag' do
it 'updates the admin flag' do
xhr :put, :grant_admin, user_id: @another_user.id
@another_user.reload
@another_user.should be_admin
@ -122,7 +122,7 @@ describe Admin::UsersController do
response.should be_forbidden
end
it 'updates the moderator flag' do
it 'updates the moderator flag' do
xhr :put, :revoke_moderation, user_id: @moderator.id
@moderator.reload
@moderator.has_trust_level?(:moderator).should_not be_true
@ -140,12 +140,12 @@ describe Admin::UsersController do
response.should be_forbidden
end
it "returns a 404 if the username doesn't exist" do
it "returns a 404 if the username doesn't exist" do
xhr :put, :grant_moderation, user_id: 123123
response.should be_forbidden
end
it 'updates the moderator flag' do
it 'updates the moderator flag' do
xhr :put, :grant_moderation, user_id: @another_user.id
@another_user.reload
@another_user.has_trust_level?(:moderator).should be_true