Skip to content

Commit 4a67b7a

Browse files
committed
Add specs for BetaSignupsController
1 parent cb72f18 commit 4a67b7a

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
require "spec_helper"
2+
3+
describe BetaSignupsController do
4+
include Devise::TestHelpers
5+
6+
describe "POST #create" do
7+
let(:user) { create(:user) }
8+
before { sign_in user }
9+
10+
it "is successful" do
11+
post :create, format: :json
12+
expect(response).to be_success
13+
end
14+
15+
it "saves a new beta_signup to the database" do
16+
expect {
17+
post :create, format: :json
18+
}.to change(BetaSignup, :count).by(1)
19+
end
20+
end
21+
end

0 commit comments

Comments
 (0)