Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
kalashnikovisme authored Sep 5, 2019
1 parent 456a4b5 commit 398edc4
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion tramway-api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ coming soon...
* Ruby >= 2.3
* все модели, которые будут использованы гемом должны наследоваться от `Tramway::Core::ApplicationRecord`
* все модели, которые будут использованы гемом должны иметь атрибут `state`, типа `string` или `text`. Этот атрибут нужен для реализации мягкого удаления. Полное удаление записей из базы не поддерживается
* все модели, которые будут использованы гемом должны иметь атрибут

Недостатки, которые будут вскоре ликвидированы:

Expand Down Expand Up @@ -79,7 +80,7 @@ t.uuid :uid, default: 'uuid_generate_v4()'
*app/models/user.rb*

```ruby
class User < ApplicationRecord
class User < Tramway::Core::ApplicationRecord
has_secure_password
end
```
Expand Down Expand Up @@ -113,6 +114,10 @@ end

**DONE!**

## Testing

# Preparation (optional)

Let's write RSpec test to check what we have:

*Gemfile*
Expand Down Expand Up @@ -171,6 +176,8 @@ RSpec.configure do |config|
end
```

# SignUp user

Create file `spec/tramway_api_spec.rb` with:

```ruby
Expand All @@ -194,6 +201,12 @@ RSpec.describe 'Post creating user', type: :feature do
end
```

# SignIn User

```ruby

```

Run `rspec` to test

We have route `user`, which create new authenticable user.
Expand Down

0 comments on commit 398edc4

Please sign in to comment.