Skip to content

Commit

Permalink
Fix specs
Browse files Browse the repository at this point in the history
  • Loading branch information
nbulaj committed Sep 3, 2017
1 parent 6582a2e commit aa78cb5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions spec/mixins/active_record/client_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,12 @@
end

it 'delete all the associated access tokens on destroy' do
user = User.create!(name: 'John', password: '123123')
user = User.create!(username: 'John', password: '123123')
app = Application.create!(name: 'app1', redirect_uri: 'https://google.com')

3.times { AccessToken.create(resource_ownder_id: user.id, client_id: app.id) }
3.times { AccessToken.create(resource_owner_id: user.id, client_id: app.id) }

expect { app.reload.destroy }.to change { app.reload.access_tokens.count }.from(3).to(0)
expect { app.reload.destroy }.to change { AccessToken.count }.from(3).to(0)
end
end
end
6 changes: 3 additions & 3 deletions spec/mixins/mongoid/client_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,12 @@
end

it 'delete all the associated access tokens on destroy' do
user = User.create(name: 'John', password: '123123')
user = User.create(username: 'John', password: '123123')
app = Application.create(name: 'app1', redirect_uri: 'https://google.com')

3.times { AccessToken.create(resource_ownder_id: user.id, client_id: app.id) }
3.times { AccessToken.create(resource_owner_id: user.id, client_id: app.id) }

expect { app.reload.destroy }.to change { app.reload.access_tokens.count }.from(3).to(0)
expect { app.reload.destroy }.to change { AccessToken.count }.from(3).to(0)
end
end
end
6 changes: 3 additions & 3 deletions spec/mixins/sequel/client_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,12 @@
end

it 'delete all the associated access tokens on destroy' do
user = User.create(name: 'John', password: '123123')
user = User.create(username: 'John', password: '123123')
app = Application.create(name: 'app1', redirect_uri: 'https://google.com')

3.times { AccessToken.create(resource_ownder_id: user.id, client_id: app.id) }
3.times { AccessToken.create(resource_owner_id: user.id, client_id: app.id) }

expect { app.reload.destroy }.to change { app.reload.access_tokens.count }.from(3).to(0)
expect { app.refresh.destroy }.to change { AccessToken.count }.from(3).to(0)
end
end
end

0 comments on commit aa78cb5

Please sign in to comment.