Fix inconsistent spec
This commit is contained in:
parent
e04d84bc4c
commit
d1b286a835
1 changed files with 4 additions and 3 deletions
|
|
@ -13,16 +13,17 @@ RSpec.describe "Credits", type: :request do
|
|||
get "/credits"
|
||||
expect(response.body).to include("You have")
|
||||
end
|
||||
|
||||
it "shows credits page if user belongs to an org" do
|
||||
user.update_column(:organization_id, organization.id)
|
||||
get "/credits"
|
||||
expect(response.body).to include("You have")
|
||||
end
|
||||
|
||||
it "shows credits page if user belongs to an org and is org admin" do
|
||||
user.update_column(:organization_id, organization.id)
|
||||
user.update_column(:org_admin, true)
|
||||
user.update_columns(organization_id: organization.id, org_admin: true)
|
||||
get "/credits"
|
||||
expect(response.body).to include(organization.name)
|
||||
expect(response.body).to include(CGI.escapeHTML(organization.name))
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue