Skip to content

Commit

Permalink
rubykube#13: remove User model and artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
subaru9 committed Jun 15, 2018
1 parent d2472af commit 8b1c21f
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 80 deletions.
24 changes: 0 additions & 24 deletions app/models/user.rb

This file was deleted.

3 changes: 1 addition & 2 deletions spec/api/v1/cors_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
require 'rails_helper'

describe APIv1::Withdraw, type: :request do
let(:user) { create(:user, :level_3) }
let(:token) { jwt_for(user) }
let(:token) { jwt_build(uid: 'O90Y88JDPQ7167') }

def check_cors(response)
expect(response.headers['Access-Control-Allow-Origin']).to eq('https://peatio.tech')
Expand Down
2 changes: 0 additions & 2 deletions spec/consumers/barong/model/account_created_consumer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
require 'rails_helper'

RSpec.describe Barong::Model::AccountCreatedConsumer do
let!(:user) { create(:user) }

describe '.call' do
let(:event) do
{
Expand Down
26 changes: 0 additions & 26 deletions spec/factories/user.rb

This file was deleted.

19 changes: 0 additions & 19 deletions spec/models/user_spec.rb

This file was deleted.

7 changes: 0 additions & 7 deletions spec/support/api_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,6 @@ def api_delete(*args)
api_request(:delete, *args)
end

#
# Generates valid JWT for user, allows to pass additional payload.
#
def jwt_for(user, payload = { x: 'x', y: 'y', z: 'z' })
jwt_build(payload.merge(uid: user.uid))
end

#
# Generates valid JWT. Accepts payload as argument. Add fields required for JWT to be valid.
#
Expand Down

0 comments on commit 8b1c21f

Please sign in to comment.