Add basic test for user questions

This commit is contained in:
Karina Kwiatek 2021-12-31 15:56:15 +01:00
parent 2f355d5041
commit 817c221551
1 changed files with 14 additions and 0 deletions

View File

@ -49,6 +49,20 @@ describe UserController, type: :controller do
end
end
describe "#questions" do
subject { get :questions, params: { username: user.screen_name } }
context "user signed in" do
before(:each) { sign_in user }
it "renders the user/questions template" do
subject
expect(assigns(:user)).to eq(user)
expect(response).to render_template("user/questions")
end
end
end
describe "#edit" do
subject { get :edit }