Testing | laravel-tags-rust | Spatie       

 SPATIE  

laravel-tags-rust
=================

spatie.be/open-source

  [Docs](https://spatie.be/docs)  [Laravel-tags-rust](https://spatie.be/docs/laravel-tags-rust/v1)  Testing

 Version   v1      

 Other versions for crawler [v1](https://spatie.be/docs/laravel-tags-rust/v1) 

  Testing    
- [ Introduction ](https://spatie.be/docs/laravel-tags-rust/v1/introduction)
- [ Support us ](https://spatie.be/docs/laravel-tags-rust/v1/support-us)
- [ Installation ](https://spatie.be/docs/laravel-tags-rust/v1/installation-and-setup)
- [ Usage ](https://spatie.be/docs/laravel-tags-rust/v1/usage)
- [ Custom models ](https://spatie.be/docs/laravel-tags-rust/v1/custom-models)
- [ Database contracts ](https://spatie.be/docs/laravel-tags-rust/v1/database)
- [ Changelog ](https://spatie.be/docs/laravel-tags-rust/v1/changelog)
- [ Testing ](https://spatie.be/docs/laravel-tags-rust/v1/testing)

 Testing
=======

Run checks with Rust 1.99 or newer:

```
cargo fmt --all -- --check
cargo clippy --locked --all-targets --all-features -- -D warnings
cargo test --locked --all-targets --all-features
cargo test --locked --doc --all-features
cargo doc --locked --no-deps --all-features
cargo package --locked --list --allow-dirty
```

- Set `RUSTFLAGS=-D warnings` and `RUSTDOCFLAGS=-D warnings` in CI.
- Pedantic Clippy checks apply to the library, build script and tests.
- The toolchain file pins Rust 1.99.0.
- The README and all Markdown guides are discovered by build.rs and tested by rustdoc. Hidden `# ` lines prepare an application and database.
- The migration snippet compiles without running because the application's migration runner owns execution. Integration tests execute that runner.
- Tests use disposable SQLite databases and the published framework. No production connection or credentials are needed.
- Feature scenarios use `#[laravel::test]`, `refresh_database`, native database assertions and `event::fake`.
- Database tests cover JSON/slugs, imported rows and morph identities, durable reloads, ordering, attach/detach, complete and type-scoped sync, invalid-write rollback, and composable any/all/without filters.
- Invalid-input assertions inspect typed package errors, rather than accepting any database failure.
- Custom-model tests select an extra translated field, a custom key and a named connection while the default connection points to an empty decoy database.
- Those tests load assignment table and morph defaults through the package-tools provider and override slugging in application configuration.
- Native join-row tests preserve an extra `pinned` option. Nested native creation rolls back the parent when a tag fails validation.
- MySQL and PostgreSQL feature builds do not establish runtime behavior on those engines.

CI retains stable Linux/macOS/Windows checks, an explicit Rust 1.99 job, dependency auditing, and the package-file inventory. A Git-only dependency cannot be normalized into a registry package, so archive verification is not a release check for this unpublished crate. Nothing runs `cargo publish`.

Public dependency reads need no token. CI uses `SPATIE_GITHUB_TOKEN` only when the secret is configured. Do not put a token in Cargo.toml or Cargo.lock.

```
cargo install cargo-audit --locked
cargo audit
```

An audit needs access to the RustSec advisory database.

 A good
match?
-------------

### What we do best

- All things Laravel
- Custom frontend components
- Building APIs
- AI-powered features
- Simplifying things
- Clean solutions
- Integrating services

### Not our cup of tea

- WordPress themes
- Cutting corners
- Free mockups to win a job
- "Just execute the briefing"

 In short: we'd like to be a **substantial part** of your project.

 [ Get in touch via email ](mailto:info@spatie.be?subject=A%20good%20match%21&body=Tell%20us%20as%20much%20as%20you%20can%20about%0A-%20your%20online%20project%0A-%20your%20planning%0A-%20your%20budget%0A-%20%E2%80%A6%0A%0AAnything%20that%20helps%20us%20to%20start%20straightforward%21)
