decko-commons/decko

View on GitHub
mod/account/spec/set/all/account_spec.rb

Summary

Maintainability
A
0 mins
Test Coverage

Start context description with 'when', 'with', or 'without'.
Open

  context "updates" do

Use let instead of an instance variable.
Open

          .to eq([Card::AnyoneSignedInID, Card::SharkID, @joe_user_card.id])

Use let instead of an instance variable.
Open

        @parties = @joe_user_card.parties # NOTE: must be called to test resets

Use let instead of an instance variable.
Open

        new_parties = [Card::AnyoneSignedInID, Card::SharkID, r1.id, @joe_user_card.id]

Use let instead of an instance variable.
Open

        expect(ids.length).to eq(@read_rules.size + 11)

Beware of using before(:all) as it may cause state to leak between tests. If you are using rspec-rails, and use_transactional_fixtures is enabled, then records created in before(:all) are not automatically rolled back.
Open

    before(:all) do

Start context description with 'when', 'with', or 'without'.
Open

    context "for Joe User" do

Use let instead of an instance variable.
Open

        expect(@parties)

Use let instead of an instance variable.
Open

        Card::Auth.as_bot { r1_members.items = [@joe_user_card.id] }

Use let instead of an instance variable.
Open

      expect(@read_rules).to be_member(Card.fetch("*all+*read").id)

There are no issues that match your filters.

Category
Status