-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path'
More file actions
25 lines (21 loc) · 649 Bytes
/
Copy path'
File metadata and controls
25 lines (21 loc) · 649 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
require 'rails_helper'
RSpec.describe AccountsController, type: :controller do
before do
end
context "A valid user is created" do
before do
@user = User.create(login: 'satoshi',password: 'nakomoto',password_confirmation: 'nakomoto')
@fake_user = controller.stub(:current_user).and_return(@user)
end
describe "GET #show" do
it "returns http success after login" do
get :show, id: @user.account.id
expect(response).to have_http_status(:success)
end
it "returns http fail" do
get :show, id: 1
expect(response).to have_http_status(:success)
end
end
end
end